You aren't doing anything wrong. Only the 15 year old is eligible for the Child Tax Credit. The 17 year old is now eligible for the Credit for Other Dependents ($500).
Here are all the requirements, per What is the Child Tax Credit?
For more information, see Who Can I Claim as a Tax Dependent?
You lost the child tax credit for the older one when they turned 17 in 2024. Instead you get the $500 credit for other dependents for the 17 year old. You should be getting CTC for the 15 year old.