Talk to a lawyer about getting the charges expunged from your record.
Edit: Yes, they would've eventually found out. Best to be honest about stuff like that. Even if you snuck it past them, you'd still have the security clearance background check to deal with... That could've landed you with fraudulent enlistment, and discharge papers.