This may be a transitory case of "I hate this place/job/people," not at all uncommon at Service Academies or the military. He may be using you as a safe sounding board to express things he doesn't feel he should at USMA. An "OMG what have I done" phase is also common as firsties see the reality of their active duty service life become ever clearer.
For the USNA mids we sponsor, I tell them it's like they are floating along the Niagara River in a familiar barrel, mastering those skills, with graduation (the Falls) years away. Then, firstie year, they come around a bend in the river, and they can hear the roar of the falls getting louder. Start of second semester, and particularly after spring break, around a final bend, they can see the wall of spray. The current has picked up, and they are going over the Falls into something both known and unknown. In some ways, they will be plebes all over again.
He knows what his service obligation is and the consequences if he quits (requests to resign his commission) after he graduates. If he quits as a cadet, voluntarily, he will likely be required to pay back a six figure amount, and not get his degree. If he graduates, gets his degree and commission, it's likely any request to resign for anything other than unusual humanitarian reasons would be approved. That is just general speculation without any knowledge of his situation.
Be a good friend, listen, be that safe sounding board, express confidence in him.
If you hear anything that worries you about his intentions toward himself that a tiny voice in the back of your head tells you "maybe I should say something to somebody," tell someone. That's something I feel I should say. Cadets are under a lot of pressure, and sometimes it seems unbearable. There are confidential counseling centers at the Academies, as well as Chaplains.
You're a good friend to be worried.
Edit: My first thought was troll, but on the off chance not...