can Turbotax avoid 10% 529 withdraw penalty for prior year scholarship award

My son graduated in 2022. He didn't use all the money I contributed into 529account because of scholarships. I withdrew leftover money in 2023. I know I pay tax on the earnings. Can I avoid paying 10% penalty with Turbotax?