Looking for possible electrical ground issues is always a good thing to do. But, when I look at the wiring diagram, the black ground wire in the left-hand switch gear is either from the clutch switch or the turn signal switch, so probably not causing your head light problem. This still may be an issue, but we will get to that in due course.
It is good you have verified the headlight is operational as the starting point. There are some other components in the circuit that might be causing your issue. If you trace the current path backwards from either the yellow (high beam) or green (low beam) wire, you get to the light dimmer switch, which is in turn powered via a blue with black tracer wire by the headlight relay. This relay gets power from the 10amp headlight fuse and also receives a signal from the alternator via a diode that the engine is running. If the engine is running, the relay with turn on and send power to the headlight.
Of these components, the easiest thing to check is the headlight fuse. Verify that there is 12VDC to the fuse when the main switch is turned on and check continuity across the fuse terminals (do this even if the fuse looks visually good) either by using an ohm setting on a multi-meter or by checking that you have good voltage through the fuse with your test light.
After the fuse, find the headlight relay (it is one of the two similar looking relays under the front of the battery box). The relay will be the one that has a plug with white, black, blue with black tracer, and red with yellow tracer wire. Pull the plug and verify that the red with yellow tracer wire has 12VDC on it when the main switch is on.
If these first tests are fine, then checking the relay is next up, but let us know how this stuff goes before we go to into that.