Default [q] xperia ion keeps turning off

Hello,
I have a problem that really annoys me a lot.
I had my phone from a friend which used it normally and after 1 year he discovered this problem: the phone kept turning off randomly.
So i took it and tried to flash a new custom rom on it which i failed because it soft-bricked and had to reinstall the stock rom.
Now i saw a lot of posts saying buy a new battery and replace it and i did so, i bought a brand new original sony battery and with a bit of work i finally made it and changed my battery.
After i did so i turned on the phone and it started, but the same problem occurred, after 2 minutes of being turned on it shuts off by itself.
I already spent too much money and time on this phone, what can i do now to try to fix it?
Thanks