No one should ever say something "can't" be done, every damn fool will surely try it then. The question is more should you? The weight from v8 to I6 is close enough to not worry about that, but space, cooling, torque (will tear up the unibody), major reinforcing to motor mounts, what trans behind it? all need to be asked. I've seen a 454 XJ in Moab.
I spent some time talking with the guy who built it.
Firewall mods are extensive, including moving heater/ac box, tucking the distributer under the cowl (AMC is up front) major mods to fit a huge 5 row radiator..
Coil overs with full width HP D60s axles, TH400 trans, atlas2..
It sure looked cool and was done well, but it aint no small feat. Most V8 xjs head to the scrapper because the platform is weak and most don't take time/money to do them right.

Good luck with the build, but I'd recomend starting with a rig that has a frame.

SD