Paging Junkyard Jim
If you get serious about doing this, I think JJ has a little more insight.
But I dumped the 4.0 in my YJ and dropped a AMC 401 right in. Mounted to the bellhousing without adapters (as AMC designed the 4.0). All I had to do was buy a set of CJ motor mounts and weld them in. The INSIDE frame dimensions of a YJ are the same width as in the CJ, so they mount easily and nice. Drop in the V8, fab up an exhaust, install a fuel pressure regulator to drop the fuel pressure down, and rewire the engine with the factory AMC harness.
AND I got a 401!
Now, understand, I don't have a EFI motor, but this is a VERY EASY swap, with ooodles of power. And with a Motorcraft 2100 carb, it runs easily at angles, inclines, bouncing, etc. It's really the next best thing to an EFI motor