Here's what I found:
(Zaid has a good answer, but sometimes on a four wire sensor the ground is floating inside the ECU [as with your Yukon] - which makes his "Step 2" not always reliable. Still, in most cases you could go the "Zaid Route" in the deep woods without power or the internet (a solar soldering iron maybe). Worst case is you would have to flip the WHITE/BLUE if the O2 sensor gave no reading - and nothing would be damaged except your time.)
I am sure of the following:
The two BLACK wires on the replacement are the heater wires. This is a resistance element, so has no polarity. From the wiring diagram, it appears you are dealing with the B2S1 sensor, or the upstream "main" sensor on bank two. For you, that means Pin D "PK" (pink) and Pin C (4.8L) "L-GN" (light green). Connect the two BLACK wires here; the order does not matter.
The BLUE and WHITE wires on the replacement are Sensor+ and Sensor- respectively. That suggests connecting BLUE to PIN B "PU" (purple) for the high side (aka Sensor+), and obviously the remaining WHITE wire connects to PIN A "TN" (tan) for the low side, (aka Sensor-).
Check the following diagrams and see if you come to the same conclusions. The replacement colors I knew, but the Yukon colors were pure mystery. (Some blood has probably crept into my gin stream...)
Good luck!


Hmmmm. On review, "Zaid Route in the Deep Woods?" Not sure what exactly was thinking... But I swear there were no banjos playing at the time!