Easiest way is find a wrecked doner. Try a search here. I've read a thread on this, but can't remember who did it.
With the right year wreck handy, it's all parts swapping. Without, you can end up running all over looking for something.
As a start, you have to swap in:
Transmission
engine flywheel.
clutch
brake/clutch pedal behind the dash
master/slave cylinders
Pilot bushing in crankshaft
input gear in Transfer case.
both driveshafts
You may need an engine/trans. computer.
Interior console parts around shifter.
I have no idea about jeep 4.0s, but a friend did something similar on a car and found that his engine crankshaft hadn't been machined for a pilot bushing. 'Ended up breaking down the engine to machine the crank.