As others have mentioned, hand-to-hand combat doesn't play a significant role in modern militaries. If you want to learn a fighting art in the build up to your term of service, I would suggest something like boxing and/or judo.
A lot of the training for boxing involves general athleticism and endurance, and if you want to go far in the military you need to not only meet the Physical Training (PT) requirement, but surpass it. Promotions can be very competitive in most militaries, and one easy way to pad your promotion packet is to receive maximum scores on your PT tests for record. Boxing teaches discipline and hard work, and it is a good primer for teaching you the depth to which you can push yourself. It is also an easy to learn but difficult to master means of self defense.
Judo, on the other hand, teaches flexibility and teamwork. These are also traits which are fundamental to military life. Literal flexibility is a great boon, it can help your overall athleticism a great deal, but the discipline of judo teaches you how to read a situation from moment-to-moment and then act in the correct manner at the correct time. A lot of military life revolves around improvisation to situations which are out of your control. One of our mantras when I was in the US Army was, "Do more, with less." There will be times when you don't have the right tools for a job, or you are asked to do the seemingly impossible, and the fluidity and flexibility which judo teaches can help you adapt your mind to a way of thinking which thrives in theses sorts of situations. Judo also teaches teamwork. Even in a competition, a judo bout is about teamwork and trust. Without these, serious injury is the result, and that is not the spirit of judo. Learning to trust your teammates/partners implicitly is also a fundamental aspect of military life. At some point, your life will literally be in the hands of your fellows, and their lives will be in your hands. It is one of the most profound aspects of military service, and it is one of the key ways that such service can change you. Practically speaking, judo teaches break-falls, and breakfalls are a skill every person should learn. There are hundreds of timetimes you will trip or slip and lose balance, and knowing how to fall while minimizing risk of injury is far more useful than being able to hurt someone with your bare hands. Judo is also about controlling your opponent and their balance. If a rare situation ever arose where you had to fight unarmed against an armed attacker, the ability to neutralize an opponents weapon is of far more use than being able to deliver a roundhouse kick to their head.
Here is a bit of unsolicited general advice. Run. Run a lot. Early in the morning, and again before bed. Run and run and run. It is easy to do, the cost of entry is low, and it will prepare you for a fundamental aspect of every modern military force.