because it works in PARK, i suspect its your key switch. remove it and clean all your connectors and contacts for it.
have you cleaned all the other electrical connectors in your harness?
if that doesnt fix it, remove your headlight from the fork ears, so you have access to the wiring.
at night, or in your dark garage, turn your key switch to ON, and start methodically wiggling each connection, and the block connector beneath the ignition switch. if there is a bad connection, you'll find it.