Huge amount of federal tax due after sale of rental property

I purchased my home in June 2008 at $415K. After living there for 3 years as primary residence, we had to move to a different state due to job relocation. So I rent out my house for the next 12 years. I sold it for $560K in 2024. Now in Turbotax, after I have entered information as "Sale of Business Property", I see an income of $272K and federal tax due went up by $60K. How is that possible? First, do I have to pay for the capital gain if I used it as primary residence? Second, how could my income be $272K - isn't it $560K minus $415K equal to $145K? Thanks.