As others have said; it is possible, albeit difficult. FWIW: My son was still with his girlfriend from high school when he entered the academy. They stayed together for about 2 1/2 years. And we do not live far from the academy, and he was able to see her many/most weekends. It still couldn't last the test of time.
I don't think that distance is the main problem in a cadet relationship with someone back home. The main problem is that people change. One of the first things parents say when they see their cadet after a few months is how they've matured, become an adult, grown up, Become a man/woman, etc... Well, the cadet and their boy/girl friend back home are no longer growing "Together". Because of totally different school/social environments, they both develop different goals, dreams, desires, etc...
The main reason most relationships with high school sweethearts don't last, is that they simply grow apart. For most cadets, coming to the academy, being on their own, and meeting other cadets from all around the world, opens their eyes to a much bigger world with so many more experiences available to them. This isn't to say that military members are better; just that they have a new and different life than their ex-schoolmates back home.
High school sweethearts going to the same college together shouldn't believe that they are going to stay together forever. When the high school sweethearts go to 2 different schools, it's even harder. When one goes to a military academy, it's the hardest. We all grow and change. Maybe you'll stay together, get married, and live happily ever after. But don't count on it. Count on yourself growing, becoming independent, maturing, and having new experiences. The same for the cadet at the academy. I really liked my son's ex-girl friend. But once they broke up, it was amazing to see how BOTH of them suddenly matured and grew up that much more. More time with new friends; new experiences; etc... We still keep in touch with his ex-girlfriend, but the best thing (For Them) was to go their own way and find their own dreams first. best of luck. mike....