the 4.7l is a great motor... Yes I did get my jeep needing head gaskets but i have 182k on the clock on my 05 wk and i just slapped some head gaskets in and it has been running like a champ the last almost 20k miles I have put on it since purchase. Its slightly more underpowered in the wk but in the wj it really isnt a bad motor so long as you take care of it and are not letting it overheat.
As mentioned the blend doors are an expensive repair so if you go for a limited with automatic temperature control make sure to get the car warm and make sure all the functions of the hvac work on BOTH sides of the dash (driver and passanger).
the 4-leaker is a good motor just know unless you spend some coin having the valve cover gasket, commonly also leaking from the head gasket and 99.99% of the time leaking from the rear main seal your going to have a dirty engine
oh yes, and lastly going by the title of your thread, how much are you going to pay us for advise? ha ha.