The rules for ESA are that claims can be made from age 16 onwards. Normally children cannot claim if they are 'receiving education', although sometimes they can (for example if they are in receipt of DLA/PIP - Child Tax Credit would then end).
If, as appears to be the case, your daughter is leaving education in July, and you are therefore ending the Child Tax Credit then, then yes, that would be the correct time for her claim ESA, provided she is over 16.
The Citizens Advice have a lot of useful information on ESA, see the following link:-
Hope this helps.