Best friend?

Theres this guy I study with and he's been in a relationship for 2 years now, the girl being a year younger than us. Me and him got close last year during our lesson but only as friends. We had people ask us if we were dating but obviously he had a girlfriend so no. I found a best friend in him but this year since we've gone back he's been weird. He doesnt talk to me infront of his gf even though she was okay with it last year. In fact he doesnt even talk to me anymore. He's now been really good friends with the girl his girlfriend doesnt like. I told my problems to my friends but they think i shouldnt care. Tbh i am a bit upset and i dont know what to do.