Green Card in two years is simply not going to work unless you got married. Then it will take about 8 months but that is from the date all the paperwork is submitted.
Read about the MAVNI program, but there is no guarantee that it will work of course. Also, so far, the USMC has not taken advantage of the MAVNI program. Your likeliest branch of service (if successful) would be the Army. Air Force and Navy do take advantage of the MAVNI program but their slots are so limited that you have to assume that you will not get it.
Some jobs sponsor for the Green Card within a short period (about 2 years) of time. Usually these jobs are in finance or very high end engineering jobs. Of course these jobs are very hard to get.
If you want to serve in the US military, your best bet will be the Army. For Marines, it is waiverable to 30 I believe, but you have to assume that you have already missed your chance.