Need Help

Hey guys I have a 2007 sportsman 500 H.O is just stopped working one day. The bike wouldn’t roll over, fuel pump wouldn’t cut in or the gauge lights wouldn’t light up. If you left the key ahead after a while it would light up and you could hear the pump cut in but it would roll. I took it to the dealer and they replaced the ECM and now it all works and the bike will roll and start for about 2 seconds and cut off again. Any suggestions?