There is a TSB for the 2004-2006 Ranger/B-series 3.0l engines
Seems the valve seats can come loose and cause misfires.
Fix requires replacing both heads, although some machine shops can replace valve seats.
Read here for TSB: 2005 Ranger 3.0L head replacement - Ford Truck Enthusiasts Forums
And here: Exhaust Valve Seat Issue on Ranger V6 3.0
Obviously it could just be a spark or fuel injector issue causing single misfire, but..................symptoms do point to this TSB.
While compression test is a good step it can't eliminate this issue because valve seat "floats", so good compression then bad compression.
Because the recessed valve seats can happen in all cylinders actual compression numbers can also help.
3.0l should show above 165psi compression on each cylinder at sea level to 2,000ft
This is when tested with all spark plugs removed(for fast crankshaft speed) on cold engine, expect above 170psi on warm engine.
Another test you can do is to remove the valve cover and the rocker assembly, then put a straight edge across the valve stems, they, of course, should be exactly the same height, if one or two are higher..........recessed valve seats