How to enter IRA distributions as Foreign Source Income by Tax Treaty to take credit for foreign taxes paid

I have retired and moved to Portugal. I became a tax resident of Portugal in October of 2023. Now by the Tax Treaty between the US and Portugal, my IRA distributions are taxed in Portugal. These distributions are from US accounts and are reported on 1099-R. How do I enter this income and reclassify it as "foreign source by treaty" and claim my foreign tax credit? I also have a carryover of foreign tax credit from previous years when I lived in India of $6000 in the Passive Income category that I would like to use. Please advise.