So this will sound really out there but I was repairing a macbook pro early 2015 and after replacing the battery it just kept shutting down when I went to type in the password. Long story short, I forgot to plug in the track pad during some troubleshooting and it worked. Seems like the battery swelling had broken something in the track pad and something was shorting or something similar so if you're in the same boat where it starts then shuts down try booting without the track pad connected and see.