Allah forgives everything if Allah is with u. He will forgive you. But the thing you have done this is not a sin. This is not even considered as haram. This is Zina. Why are u even a Muslim if u can't follow what Allah has told us. At first BF and GF relationship is considered haram. U can't do a relation with a non- mahrams. 2nd if u are just friends then why did u even thinked of doing this. Men can't even shake hands with a non-mahram and u both saw eachother naked. U had ***. What is this. I know that at this age we can't control ourselves but remember Allah is watching you. You can do whatever hiding from the world but Allah is watching u. And this masturbate is also not allowed in Islam before marriage. If u are into this plz leave it. Look man nothing can change now.
Allah Almighty states, “O servants of Mine who have acted recklessly against their own selves, do not despair of Allah’s mercy. Surely, Allah will forgive all sins. Surely, He is the One who is the Most-Forgiving, the Very-Merciful” (Quran 39:53).
Look now u have done this. Allah knows best. For your forgiveness pray 5 times namaz daily. Dual for your forgiveness and tell your girlfriend to do the same. You both should be shameful and should dual for forgiveness together. Read Quran and promise to Allah that u are very guilty. Ask for forgiveness and do this everyday. U should do fasting that will increase ur Imaan. If it's in your destiny u will find it out on the Day of Judgement. Look we are all sinful. I also don't used to pray namaz when I was your age. I am 23 years old. I also used to pray only in Ramadan but I was in my limits. Lots of my friend use bad words for fun. But I had a restriction. Allah is watching me and I will have to give answer to Allah. Every human now is addicted to the bad things and sexual thoughts because it's a human nature. I was also addicted to bad things when I was 14-15 but then I told myself that it's wrong and Allah is watching me. I then started prating namaz and I got closer to Allah. You were closer to Shaitan when u did that. Do it everyday and never even think about doing the think u did. Sex is only allowed between husband and wife. A man can only have sex with his wife so remember that. Pray namaz, Read Quran with translation and u will understand everything. You will get closer to Allah. Pray for your Mother, Father, Sister and Mother because that thing u did. Allah can give punishment to your whole family so be aware and Remember Allah is watching u.
if your girlfriend got some pregnancy issues then u should help her immediately. If thing is worse than it is gone to next level and u should tell your parents about this.