I'm not sure why you think it could be the headlight switch.
It certainly could be the ignition or the neutral safety switch. It could also be a loose contact someplace or a weak ground connection. Have you tried shifting to neutral instead of park when it fails to start?