You should focus a little on what engine to get. That may be a factor long term.
4x4 should have either a 3.0 or 4.0 V6. Most are listed as V6 and don't specify "which" v6. An easy way to tell is to look at the water pump pulley. If it is ribbed it is a 3.0, if it is flat it is a 4.0.
2000 and older 4.0 is about 150 HP and is an OHV motor.
2001 and newer 4.0 is about 200 HP and is a SOHC Motor. WHile it has more HP it is also harder to work on. There are two timing chains. One in front, one in back. Changing the timing chain means removing the engine. Some early models had a problem with a timing chain rattle.
All 3.0's are about 150 HP. They are a pushrod motor which makes it the easiest (imo) to get into the engine to do some work on it.
There are some HP variances between years but I tried to keep it basic overall.
2004 Ford Ranger Sonic Blue 4dr 4x4 4.0 Manual