Yes, time in the military does qualify for PSLF. However, there are unique student loan benefits, even beyond PSLF, available to people in the military and veterans. The best resource for you is this PDF from the Department of Education: https://studentaid.gov/sites/default/files/scholarships-for-military.pdf