Here is a link to the Defense Finance and Accounting Service web site where you can get your W-2:
https://www.dfas.mil/militaryseparations/W2.html