Ok, let me just echo what was previously said first; you made a poor decision putting yourself in this position. I am sure lots of other incoming cadets/midshipmen are putting themselves in the same situation this summer; you just got caught. That said, I'll focus on what you can do now.
First, I would never advocate lying; that is absolutely unacceptable, but remember, it is up to the prosecution to prove the offense, not on you to prove your innocence. You do not say what state you are in, but as a California police officer for over 20 years, I can tell you that, around here, these tickets are handled in the same manner as a traffic ticket. There is no prosecutor from the District Attorney's office, it is just you and the officer in front of the judge. The officer tells the judge what he observed and why he wrote the ticket, then you get the opportunity to make a statement to the judge or ask the officer questions. You could ask the officer questions about where you were when he saw you, where the alcohol was in relation to you, did he see you with any alcohol in your actual possession, did he conduct any tests to determine if you had been drinking, etc. Just be aware though that if the officer testifies that he smelled an odor of an alcoholic beverage emitting from your breath and person or that you had other objective symptoms of intoxication, that may be enough for the judge to convict you. If the officer does not present any information that connects you to the alcohol at the camp site, you could request that the judge dismiss the charges due to a lack of evidence. Just be sure to remain calm and polite and do not argue with the officer. Direct questions to him and make statements to the judge. If the officer does present evidence connecting you to the alcohol, you could then plead guilty or no contest if you wanted. Also, if the officer does not show up to court without rescheduling the appearance (it happens), the case would be dismissed. If, in fact, you were not drinking (which I doubt from the "we" statement) you could also bring your friends in to testify to that.
You can do this yourself or you could hire a lawyer to represent you.