Non Resident Tax

I was on H1-B, working in CA but in Dec 2023 i came back to my home country for some family emergency and had to apply for a visa to come back to US. Apparently, my visa went into administrative processing and to this date, its still in processing. In the mean time, my company extended remote work to me but had to let me go in Oct 2024. My salary got credited into my CA bank account and from there i was sending it back home while i was still working remotely.

For the whole year, i wasn't in US for a single day so didn't meet the substantial presence test. When i was trying to file my tax on turbo tax, the system showed my federal tax owed as $72 and CA refund as $5000 something dollars but later on i found out that turbo tax doesn't support filing of tax if i dont meet the presence test so i was referred to Sprint tax. After filling out the forms, Sprint tax showed my federal tax owed as $1800 (not sure about my CA refund as it never got to that stage). I filed for an extension when i found out i wouldn't be able to file through turbo tax just in case.

Now, i don't really have $1800 to give as the federal amount due. Plus i'm not sure how there can be such a high difference in tax owed and refund due to my absence from US. What to do?