Long term relationship

I'm going into the Air Force once I finish up highschool and my boyfriend is going to college in 5 months. 
I'm concerned that the distance will be to much and that our relationship won't last. 
Can anyone give me some advice or if they have a SO in the military, how did/ are you getting through it??