Can this relationship work?

My boyfriend and I have been together for all of highschool and we are going to college soon . However we are going to different colleges in the same state in near by towns . We want to get married when we finish college but I'm afraid that the distance might be an issue. Should we continue this relationship? Or just be friends?