Navy relationship

My bf of 9 months just recently told me that he's going to be going into the navy. I completely support him as I plan on marrying this man in the future. The only thing is.. I've been contemplating joining the military for 2 years now and lately it's been making more sense. The only reason I didn't join before is because I wasn't sure what branch would fit me best. Well I now I know and I told my mom but I haven't told my bf. I'm so freaking scared that as soon as I tell him that our relationship will be over because of the distance since we aren't married and it's obvious that the navy won't keep us together. Any advice?