A person is guilty of criminal trespass in the first degree if he or she knowingly enters or remains unlawfully in a building. A person is guilty of criminal trespass in the second degree if he or she knowingly enters or remains unlawfully in or upon premises of another under circumstances not constituting criminal trespass in the first degree. The fact that you were "drunk and trying to walk home" and have no recollection of the incident would suggest that the element of knowing is not present. Should that be the case you would have a good argument for dismissal of the charge or a finding of not guilty at trial. However, I would need to see the police report to offer a complete assessment of your options. Feel free to contact me if you would like to discuss the matter further.
I concur with the answer provided below and have some additional comments. There is a lot at stake for you in this case because of your status in the Marines. A criminal conviction could create a problem for you in your military career. Since you have not prior convictions, it is very important that an attorney try to get this case resolved for you in a manner that will leave you without any convicitions on your record. I'd be happy to consult with you about this case. Make sure whoever you retain has experience representing people on cases such as this and will take into account the consequences for your military career.
Thank you for your service to our country. A good defense attorney will do everything in his or her power to protect your record to minimize the impact on your career. Many prosecutors will consider your service in the negotiating process. Your clean record is also a big plus.
Add these issues to the potential intoxication/mental state defense and it sounds like you have some good ammo in your case.