Fully charge the battery with an off-the-bike charger. Let it rest unconnected for two hours after charging and measure the battery voltage; 12.6-12.8V is ok.
You could also take the battery to a shop to have it load tested, in order to see if it is still serviceable.
Anyway, put a known good battery back in the bike with lighting off and measure the voltage at idle, 2000, 3000, 4000, and 5000, RPM. Record these readings.
Repeat the above test with the lights on.
Report your findings to us and we will give you the next steps toward finding the problem.
Of course there is the alternate method of replacing each part of the charging system in turn, until it no longer runs the battery down. But, I prefer testing to find THE bad component and replacing just that.
You could also tells us what the wattage of your replacement headlight is. The bike's alternator is not an unlimited source of power, even in pristine condition.
Cheers,