if you original switch is out of the truck you can do a continuity check with a meter.
with the switch pushed in you should not have continuity from posts labeled "To dimmer switch" to "to ammeter"
pull switch to first position then you will have continuity.
I would verify that the three post on the dimmer switch are correct.
Do you have voltage to the the "Batt" post on the dimmer switch with the headlamp switch off?
..link...