I have put much newer 4.0L in older jeeps just use all the old parts from the original engine.
"
The HO and Renix have some differences but none that can’t be overcome very easily.
Any HO engine from an XJ or ZJ through 1999 can be used. One running change was that the rear of the head was no longer drilled and tapped for the temperature gauge sender beginning in the 96 model year. The sender can be relocated to the threaded hole in the thermostat housing taken from the HO engine. You’ll have to extend the wire to that location. Some brave souls even drill and tap the HO head for the sender.
You will be using the intake and exhaust manifolds from your Renix, along with all your sensors and wiring. Since the intake ports of the HO are slightly different, you use the Renix gasket. Exhaust ports are identical. You will need to use your Renix distributor as it is different than the HO because they use different fuel management systems. The flywheel or flexplate from the Renix must be used so your CPS gets the correct signals. The valve cover from the Renix allows you to keep your CCV system intact and requires no modifications.
The HO block will have a plug in the coolant galley on the driver’s side of the block, closest to the front, which needs to be removed so your Coolant Temp Sensor can be installed in it’s place just as it is on the Renix. It requires a 5/16" square drive or a modified 3/8" drive that has been ground down to fit. Do this before installing the engine.
As for the knock sensor, which is located just above the oil pan on the driver’s side of the engine about mid way, all the blocks I’ve seen are threaded for it. If not, I’ve heard they may be drilled but not tapped. Tap the hole if that’s the case."