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 the PDF from the Department of Education attached here.
You may also visit Federal Student Aid for more information.