Sounds like you need a new engine.

Was coolant disappearing? These engines have a head crack issue that can lead to the bottom end going out if not dealt with before the crank bearings are destroyed by the coolant in the oil.
Any engine you source make sure you pull the valve cover and look between the valves between cylinders #3 and #4. If it doesn't have "TUPY" cast into the head then it is the old style head and might crack again. The TUPY castings started around 2003.
2005-2006 are supposed to have oil pump drive issues but I haven't encountered it myself - don't have any Jeeps that new.
Both my 2000 and 2001 XJs needed the heads replaced.
I don't remember what is the interchange/compatibility between the XJ/TJ/WJ engines.
HTH