Check local junk yards if you need a replacement.
But I would consider checking and cleaning all contacts, and wires, before doing that.
If you can get it out and plug it into the other headlight pigtail, it might eliminate wiring questions from its original position.