The camshaft position sensor (CMP sensor) on a 2005 Ford Ranger 3.0L V6 is located on the
passenger side (right side) of the engine, near the front of the cylinder head. It's usually mounted on the cylinder head itself, fairly close to the camshaft sprocket. You'll likely need to look directly at the front of the engine from the passenger side to spot it.
It's a relatively small sensor, often with a single electrical connector. A repair manual or online image search for "2005 Ford Ranger 3.0L camshaft position sensor location" will greatly assist in its identification. Be mindful of hot engine parts if the engine is recently running.