Refund of federal withheld for J1 India for Resident Alien

I was employed as a postdoctoral fellow with J1 visa from 2022 to 2024. I returned India before the completion of 2-year stay in the US.  However, I didn't avail treaty benefit for waiver of federal taxes as I was not sure regarding my return. However, for the current year I have to file as resident alien and want to claim the treaty benefits. Please suggest how and where to file for tax return.