How do I request a refund of extra taxes I paid to the state of Maryland?

How can I amend my 2022, 2023, and current 2024 tax returns to remove any obligation to pay state income taxes to Maryland?  I work for the Social Security Administration (SSA), a federal employer, at their headquarters building in Maryland.  However, since early 2022 I have been permanently domiciled in Washington D.C., and I have primarily teleworked from Washington D.C.  SSA changed my state withholding to Washington D.C. in mid-2024.

 

Additional Background:

In January 2022 I took a new job at the Social Security Administration (SSA) in Maryland.  My permanent residence became Washington D.C. with my fiancé.  However, I also rented a room in Maryland for several months before we got married on May 7, 2022.  Because I was working in Maryland, and SSA was paying my state tax to Maryland, I thought I had to file a non-resident tax return in Maryland (in addition to D.C.)  So I filed as a nonresident in Maryland in 2022 and 2023.  However, I recently learned that I am not technically a resident of the state of Maryland, as I lived in Maryland less than six months (Jan 1, 2022 through May 6, 2022).  It appears that I should amend my past tax returns to get back the extra income tax that I paid to Maryland in 2022, 2023, and now in 2024, as my Maryland tax has been higher than my D.C. tax.  I am currently working on my 2024 tax return, and I filed all tax returns through TurboTax.

 

Thank you for your assistance in advance.