Could be the start switch contacts or the big connector on the left side.
No headlights is the clue.
It is not a safety switch & the kickstand switch only plays a part if the bike thinks it is in gear, if you have a neutral light forget the kickstand switch as being the problem.
If the bike starts but stalls every time you select a gear it is the kickstand switch.
Some of the 19 rides in my shed
2014 V2, Snoopy
2009 Wee, Pumbaa the pig
WR450F, The Blue Postie Bike
YZ250N smoker with rego, Stinky.
Yamaha MT09 (FZ09), The Scud missile.
Club Lead not Club Med.
He with the most toys wins.
Out of my depth in a puddle.
Live life on the edge you will see more that way.
Ridding a motorcycle keeps things in balance.
At the end of each trail and at the end of each day history is made.