When there are multiple zones with the same name, you can drill down to a specific zone by filtering your results. E.g.
aws route53 list-hosted-zones-by-name \
--profile "myprofile" \
--output text \
--query "HostedZones[?(Config.PrivateZone==`true` && Name==`example.com.`)].Id"
This should output something like
/hostedzone/ABCDEF12345678