what do i do w an ex that “loves” me

So i’ve been dating this guy (i’m 21 hes 22) for almost a year and a half now and everytime things get a little serious he pulls away so i just broke up with him bc i feel like he’s just leading me on. when we first started dating everything was perfect but now he tells me “he doesn’t think about the future with me in it” and that “he’s only focused on school” (HE HAS 1 more year left!?) it’s either you want all of me, or you get nothing at all. he calls me his best friend (he doesn’t have too many friends) and tells me he still loves me and wants to hang out. this is very hard for me to do because i’m someone who thinks long term and wants a real relationship. but at this time i want to be single because at this age no guy wants something serious unless they’re older. so i’m gonna just start thinking like a guy for now on.. but what do i do with him? he asks me almost every other day to hang.. were in the same friend group so it’s kinda hard to cut him off completely.