The bus companies tendering for TfL routes buy or lease the buses. The one recent time when TfL was involved in that was to cope with Boris Johnsons disastrous decision to have a new routemaster hybrid design, in opposition to all knowledgable advice. Johnson as mayor had signed up to 1000 of them, not the 100 the GLC had been lead to believe. To deal with these now unwanted buses, TfL had to complete the purchase and issue them on lease for nominal fees to bus companies who really didn't want them. They are being phased out early at 12 years old, with some committing suicide first by self- immolation.
So that much nothing to do with Sadiq Khan, all to do with Boris Johnson.
As for the decision to have zero emission buses, that too was nothing to do with Khan. It all started when the EU was about to hit the British government with £300 million in pollution fines in 2010. We were granted a stay of execution of three months pending the government starting to introduce serious reduction measures, which they did, but too slowly. Boris Johnson as London mayor was responsible for all the electric and hybrid introduction policies between 2008 and 2016.
On the 29 April 2015 the UK Supreme Court quashed the Government’s ineffective plans to cut illegal levels of air pollution in Britain and ordered it to deliver new ones by the end of the year.
The Supreme Court Justices were unanimous in their decision, handed down that morning, saying: “The new Government, whatever its political complexion, should be left in no doubt as to the need for immediate action to address this issue.”
They had prescribed such measures as congestion charges and ULEZ zones which since then the governments national and local have to comply with, which of course includes London's mayor, at the time Johnson. Less than a month later on 20/5/2015 Johnson was exposed to be deliberately dragging his heel on the introductions, leaving his successor Sadiq Khan to play catchup, which he has done according to law ever since with euro 6 and zero emission buses and now ULEZ across Greater London.
.