I'll jump in here to mention the ZJ V8s a little too since there's been no discussion on them.
They are the Magnum 5.2L engines, and aren't bad little powerplants. The biggest issue with them was the "kegger" aluminum intake manifold, which due to manufacturing processes, ended up with a steel plenum plate screwed to the bottom. Steel and aluminum do not expand and contract at the same rates. Accordingly, ALL of these engines had plenum gasket failures around ~30K miles. Chrysler typically did the first gasket replacement for free under warranty, but when you're looking at an engine with 80K+ miles, you're almost guaranteed to have an engine with another failed plenum gasket. The failure causes oil vapors (and oil) to get sucked into the intake. This lowers octane ratings, and also significantly increases carbon deposits on the pistons, which leads to major pinging, increased compression, and eventually a rod getting tossed. Accordingly, engines pushing over 150K miles that haven't had a second gasket replaced likely have been pinging for a while, and have some carbon deposits to address.
That's not to say that these engines can't necessarily be saved, depending on what unknown damage may already exist. The aftermarket responded with an aluminum plenum plate, which when installed properly, permanently fixes this issue. And a couple cans of the MOPAR Combustion Chamber Cleaner will do wonders for the carbon deposits.
The OBDI engines are probably the easier engines to swap due to the simpler control systems for OBDI. Those 5.2Ls also came bolted to the 46RH, which is NOT a computer-controlled transmission. The issue with all the ZJ transmissions (except for the AW4, bolted to the 4.0L for just a couple months in 1993) is that they require periodic band adjustment per the FSM, and regular fluid/filter changes. Again, if the transmission's been maintained, they're known to go over 200K miles. But if they're ignored, they'll commonly fail before 150K. If you get the OBDII engine, it'll come with the 44RE, which uses the same PCM (powertrain control module) as the engine, not to mention being somewhat weaker than the 46RH. While you can transplant the OBDII engine and make it run with another transmission (including the 44RH), you'll have a check-engine light because the PCM will be looking for the appropriate electronic transmission to control.
Lack of addressing the plenum and lack of basic transmission maintenance frequently causes cheap ZJs. I see $300-$500 ZJs ALL THE TIME advertised with either a blown engine or a bad transmission.
There's lots of aftermarket support for the Magnum engines, and quite frankly there's a LOT of these engines out there since Chrysler used them in so many applications. And because they use a standard Chrysler bolt-pattern, your transmission world opens up to all the other MOPAR transmission options.
Most of the ZJ 5.2Ls came with the NP249 transfercase. This is a full-time 4WD case that uses a viscous coupler to split power. Either way, it's not something I'd generally recommend for a CJ (aside from it being the driver's-side drop). The viscous coupler was never designed to last much more than 100K miles, so if you find a ZJ with a transmission that still seems functional and a plenum that isn't completely blown, it'll probably still have a bad viscous coupler. If so, that's a good donor.
Keep in mind that the 4.0L carried on with the AMC bolt-pattern up through its demise. If you go with one of the 4.0L drivetrains, as been mentioned above, you'll run into problems with the CJ's passenger-drop front axle. So at some point you may need to consider a transfercase adapter to keep the Dana 300, or a bellhousing adapter to keep your existing CJ transmission. The 4.0L also uses a crank-position sensor, requiring you to either machine your 258 bellhousing, or get one specifically designed to work with your engine/transmission combo. Advanced Adapters makes a nice bellhousing designed to mate a 4.0L to the CJ transmissions, using the CJ clutch linkage.