Just so you will know, the "Z" code is a 5.3 Flex Fuel V8 engine. Now to your question....
1. There are 4 oxygen sensors on this truck.
2. All 4 are screwed into the exhaust pipes, see diagram for locations:
3. To swap them out, follow the electrical connector up, and unplug it, then simply unscrew the oxygen sensor.
4. The check engine will not go off by itself. You will either need to have a scan tool to shut t off, or disconnect the NEG battery cable for 5 min (be sure you have your radio code if you use this method!)