To be absolutely certain, you should:
* Consult your vehicle's repair manual: This is the most reliable source. The manual will have diagrams and specific instructions.
* Use an online parts diagram: Many online auto parts stores (like AutoZone, Advance Auto Parts, etc.) allow you to select your vehicle's year, make, and model, and then view a parts diagram showing the location of the EGR valve.
Searching online for "4.0L Ford Ranger EGR valve location [Year of your Ranger]" will also likely yield helpful images and forum discussions. Remember to always double-check the year of your truck for accuracy.