The pilot light is completely separate from the headlights. It will be on its own circuit.
Unplug it (should be on the right side clipped to headlight shell, at least on 08+) and see if you're getting 12v at the plug, that would tell you if it's the light or the connection, which it almost certainly is.
If you're not getting 12v at the plug with the bike turned on something further up is no longer connected (or a fuse is blown).
Unplug it (should be on the right side clipped to headlight shell, at least on 08+) and see if you're getting 12v at the plug, that would tell you if it's the light or the connection, which it almost certainly is.
If you're not getting 12v at the plug with the bike turned on something further up is no longer connected (or a fuse is blown).