I have read that some of those had a weak ground wire. Might try adding a heavier gauge ground wire to better ground the battery to the frame. You can also check battery voltage while running; it should exceed 12V if the stator is doing it's job.
Mine dies the same thing I put new battery and battery connections. Changed the spark plug and still no idle. Runs great when riding just won’t idle starts idles for a second or two and dies. Sure could use some help!