17mpg is pretty normal for a 3.0:
The most accurate Ford Ranger MPG estimates based on real world results of 6.8 million miles driven in 482 Ford Rangers
www.fuelly.com
Regardless of the engine, a Regular cab, 2wd, manual transmission Ranger will typically have the best fuel economy since they're lighter, have less to turn, and can choose proper engine speed. Add 4wd and the fuel economy drops. Add extended cab and the fuel economy drops. Add auto trans and the fuel economy drops. If you've got an extended cab/4wd/Auto trans, it's the worst possible combo for fuel efficiency.
These are not new trucks with bodies developed in wind tunnels, or 8-10 spd transmissions that will keep the engine at the optimal rpm as much as possible. There is a limit to what can be achieved with this recipe without making really major changes to the components. That being said, it may be possible to improve things.
Mechanical options:
1) Stay on top of maintenance. Make sure alignment is good, brakes aren't dragging, all fluids are fresh/good. Old, tired O2 sensors can tank fuel economy without throwing a code, so if they're old it might be time to replace.
2) Check throttle cable for slack. Do the "Throttle Cable Mod" if necessary
3) A crank underdrive pulley and an electric cooling fan conversion can typically gain 1-3mpg, and make the truck a bit more responsive at the same time.
4) Make sure appropriate gearing is selected for the task. Just be aware that selecting gearing that helps at highway speeds can hurt you in the city, or vice versa. 3.73 seems to be a decent ratio for an all-around truck in most cases.
Highway fuel economy mostly comes down to rolling resistance (tires), gearing (controls engine rpm), and aerodynamics (frontal area, and airflow over/around/through the body). As speed increases, so does resistance in all of these areas, so if you drive 70mph you're probably going to see some low efficiency numbers.
To reduce frontal area you can consider things like lowering the truck, and making sure the tires don't protrude outside of the body.
To improve rolling resistance, you can select lighter wheels and/or tires.
To improve aerodynamics, you can start with basic things like a grille block, front air dam, side skirts, or smooth bellypan. Anything that guides the air cleanly around your truck instead of through the messy mechanical stuff underneath is good here, and can often be done pretty cheaply. There were a few Ranger threads on ecomodders back in the day that might give you some inspiration.
Doing all of these things to optimize for the perfect fuel efficient Ranger would cost thousands of dollars, so it probably makes sense to pick and choose the options that fit your budget, usage, and personal style while considering the limitations of your specific truck's configuration.