The 2.5 in the YJ's use the GM 60 deg bell housing.. a GM 2.8/3.4 from a rear wheel drive vehicle like a camaro or cherokee or s10 will bolt up. You don't here of this much because as stated above the trany behind the 2.5 is garbage!
The 2.5 and that same trany setup was used in the Dodge Dakota's.
I would not waste money on rebuild. these are pretty easy to find already running! Find a different engine and start on it while yours is still running! You transfercase can be re-used, you will just need to change the input shaft and that is pretty easy to do.
Any other engine is going to require different mounts, wiring, and much more so think long and hard about what to swap.. I had a 2.5 in a 92 YJ. it was a good little rig but after working up the cost of swapping a dif engine in! it wasn't worth it.. I sold it and bought something else!!