In order to change your name and gender on your UK driving licence you do not need to do anything special but should just follow the standard process for changing your name and photo. However the gender marker on a driving licence is not obvious and it may not be immediately obvious if it has been changed. This document includes an explanation of how your gender is recorded as part of your driver number.
Explanation of codes on UK driving licence
Your driver number is shown in space number 5 on your driving licence. The first five characters are usually the first five letters of your surname, so for Joe Bloggs the first five characters would be BLOGG. If your surname is less than five characters long then it is made up to five characters using the number 9, so for Jane Doe the first five characters would be DOE99.
The next six characters represent your date of birth but the year is split up giving the unusual format YMMDDY. Therefore a person with a male driving licence that was born on 23rd January 1985 would have the next six characters be 801235. However, a person with a female driving licence gets 50 added onto the month so a person with a female driving licence that was born on 23rd January 1985 would have the next six characters be 851235. That single digit is the gender marker on a driving licence - it will be 0 or 1 for male and 5 or 6 for female.