To be certain, you should:
1. Consult your vehicle's repair manual: This is the most reliable source. The manual will have diagrams showing the exact location.
2. Look closely around the thermostat housing: This is the most common location. The sensor may be directly in the housing or mounted nearby on the cylinder head.
3. Use an online parts diagram: Many websites (like auto parts stores' websites) offer parts diagrams for specific vehicle years and engine types. Searching for your exact year and engine will pinpoint it.
Without knowing the specific year of your Ford Ranger, a more precise location cannot be given.