I'd go with the 4.0.
Very reliable motors if taken care of. My 02 has 260 000 miles on it. Never even had the check engine light come on in it's life. I don't know much about the auto transmissions, but the manuals are known for slave cylinder problems. I'm on my 2nd clutch and 3rd slave cylinder.
Overall, no matter what Ranger you buy, it'll be a good truck, but you hear lots of complaints on here about the 3.0's being gutless and some problems with them. The 4.0 has decent power, but it's got almost V8 fuel consumption. You'll generally see 16-21mpg from it.
I wouldnt be afraid to buy it with 100k on the clock, it's still got lots of life left. Just make sure it's got a documented service history.