Nobody should be allowed to do a sex change until they are at least 21, when their bodies are fully developed. I think it should be for medical purposes only.
It's pretty well established that if you're having gender dysphoria for years after puberty has hit, it's not going away. Waiting until 21 for hormones can greatly decrease the final effects, and how well you pass is a huge portion of your happiness post-op.
There should definitely be a good amount of therapy involved, and a long time of the trans feelings being there before starting any sort of treatment, but waiting all the way to 21 isn't the answer. Possibly waiting that long for the final operation (or any surgery for that matter), but hormones can do just as much changing on their own so it's really a moot point. There has to be a middle ground between not letting 4 year olds transition and giving teens that need it a lifeline
If you deny treatment options based on age, some that are desperate enough will take matters into their own hands. Buying hormones on the internet is extremely dangerous, and assuming what you get is what it's claimed to be you still need constant bloodwork to make sure nothing is going wrong. It's the same situation you get when drug users are afraid to call in a OD for fear of being prosecuted.