Check out the rules available at: Public Service Loan Forgiveness | Federal Student Aid that states

If you are employed by a U.S. federal, state, local, or tribal government or not-for-profit organization, you might be eligible for the Public Service Loan Forgiveness Program. The PSLF Program forgives the remaining balance on your Direct Loans after you have made 120 qualifying monthly payments under a qualifying repayment plan while working full-time for a qualifying employer.

To qualify for PSLF, you must:

Qualifying Employer:

Qualifying employment for the PSLF Program isn’t about the specific job that you do for your employer. Instead, it’s about who your employer is. Employment with the following types of organizations qualifies for PSLF:

  • Government organizations at any level (U.S. federal, state, local, or tribal) – this includes the U.S. military
  • Not-for-profit organizations that are tax-exempt under Section 501(c)(3) of the Internal Revenue Code

Serving as a full-time AmeriCorps or Peace Corps volunteer also counts as qualifying employment for the PSLF Program. Use our employer search tool to help determine if your employer qualifies for PSLF.

More information is available at: https://studentaid.gov/manage-loans/forgiveness-cancellation/public-service or read through these FAQs.