Likely the rectifier.
It sounds like you were running on only the battery. The jump and restart at the service station recharged the battery a bit and allowed enough to run.
Headlights quickly drain things back down again if there's no power coming in.
If it's daylight, pull the headlight fuses and the bike should run for quite a few miles (YMMV) if the battery is only powering ignition.
I say rectifier because that's the common problem. The actual problem is that electrical power is not being put into the bike from the stator that produces it.
So, the problem can be with the stator, the wiring, the connector plugs, the rectifier and so-on up the line.
Check easy stuff first:
(a) batter terminal connections and all "ground" connections.
(b) the 3-wire connector between the stator and rectifier
(c) condition of battery (will it hold a good charge)
(d) charge rate.....if you charge the battery and get the bike to run, measure voltage across battery terminals while bike is running at idle and then at about 4-5000 rpm (max. output).
We'll go from there............................