Where is the O2 sensor located on a 1998 Ford F-150 5.4?

The oxygen sensor measures the oxygen content of the exhaust stream. Therefore it is always located in the exhaust system somewhere between the exhaust manifold ports and the catalytic converter. On all Fords that I have worked on the O2 sensor is located in the exhaust header on the passenger side of the vehicle usually very near the starter. Look on the underside of the vehicle, on the exhaust header, just behind the right front tire. You should see a cylindrical tube screwed into the header with a electrical lead attached.