529 Distribution used for student loans

I thought part of the Secure Act that parents can withdraw from 529 account tax free to pay for student loans as part of qualified education expenses up to $10,000.

 

As a parent and the recipient on 1099-Q, the Earnings is being picked up as Other Income on Schedule 1 and Additional Taxes on Schedule 2.

 

The 529 withdrawal was $5400+ and the Student Loan payment was $5500

 

Did I misinterpret the Secure Act or do I have something entered incorrectly?