To answer your first question, my understanding is any H.O. 4.0 will be a direct swap. So any I6 engine made by Jeep from '91 or later.
As Beg said, need more information to give a good answer. Some possibilities are not keeping up on fluid levels, either oil or coolant. Getting water into the oil, or into the motor it's self. Wrong kind of fuel (E85) for the engine set up. Generally it's pretty hard to kill these things, but it is possible.