I have seen it done.
The only way to do it is to find a parts jeep with the drivetrain in that you want.
A rusted out one or a wrecked with low mileage,CHEAP
Then you are going to need the longer fuel lines,6 cylinder radiator,modify your exhaust.
move the motor mounts,swap in the ecm and harness.
now your are ready to bolt in your 4.0,and transmission.
you have to use the donor jeeps crossmember.
This is how my buddy did his. He figures he has about $1500 into the swap.
He paid a $1000 for the donor jeep,(rusted out 94' sahara with 60 k.) this seems like alot but it had a clean sahara interior,and a nice hardtop.
between 40 and 60 hours labor doing it.
Came out nice ,4.0 with 4.11's rip.
I have been thinking about it to,but for the same money and time you can swap in a fuel injected V8.
But say you can find a similar donor jeep for super cheap,it's almost worth it.