The camshaft position sensor (CMP sensor) on a 2002 Ford Ranger 3.0L V6 is located on the
passenger side of the engine, usually near the
front of the cylinder head. It's mounted in a relatively accessible location, but you'll likely need to remove some components (like the air intake) to get a good view of it.
To be absolutely certain: Consult a repair manual specific to your 2002 Ford Ranger 3.0L V6. A diagram showing the sensor's location will be far more reliable than a general description. You can find these manuals online or at auto parts stores. The Haynes and Chilton manuals are popular choices.