Neither are an upgrade to the 4.7L and the parts needed including a different transmission make it not financially viable.
You could try a 5.7L Hemi..that will at least bolt up to the transmission, but you will need custom engine mounts and figure out the wiring.
Sorry, but best bet is another 4.7L if your engine needs replacement.