When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
that doesn't look like an O2 sensor connector. That connector looks like the temp gauge sender for digital dash equipped models. If you don't have a digital instrument cluster (who does?), the it doesn't plug into anything. But then again, its not clear from the pictures what is going on, I can't tell if that would reach to the area the sender would be if you had one.
As far as running rough, depending on that sensors function, its hard to say if it is related or not. But I would ask, when the head job was done, what work was done on the head, was the proper torque sequence followed, were the head bolts reused? Are all the gaskets new? Are the plug wires hooked in the proper sequence? Are they new? Are the plugs new? Why did the head gasket fail? A few more details can help use piece together what might be going on so that we can give you more accurate advise instead of stabbing at the dark.