I think there's an argument to say that such surgery shouldn't be legal at all, let alone provided for free by the NHS.
I'm all for people having the choice for what they want to do with their bodies, but this assumes that you have the mental capacity to make such decisions for yourself in a reasonably considered way, and are suitably well informed to ensure that they are in your own best interests.
For example, if a child goes to a doctor asking for a vasectomy, obviously the doctor shouldn't perform it, because that child isn't mentally capable of making its own decisions yet, or mature enough to bear the responsibility of that decision turning out not to be in their best interests. If an adult goes to a doctor asking to be injected with blood infected with HIV, obviously the doctor shouldn't do it, because that person either has no idea what HIV is, or has some mental issues causing them to believe it is in their best interests even though it is not. Similarly, if I go to a doctor asking to have my leg amputated because I feel like I should become a disabled person, there's no way it would ever be done.
In all these cases, the patient needs to either be provided with more accurate information, psychiatric help, or simply have their request denied by the doctor who has a professional duty of care.
Gender reassignment surgery shares similar features with the above examples. Firstly, in order to achieve the best results, it needs to be performed when the person is of a young age and hasn't fully developed all the physical features associated with their biological sex. Secondly, it is irreversible, and the person won't be able to do much about it if they later realise that it wasn't the right decision for them. Thirdly, people who request this kind of surgery are usually suffering from gender identity disorder, a psychiatric issue which impairs their objectivity when considering the suitability of a decision like this.