So, a slave that i'm particularly fond of is about to reach her retirement age and i kinda want to keep her forever... how exactly does the mind body transfer thing works again?
In the remote surgery, go to the "Exotic" tab and choose "Swap her body with another of your stock". You can choose to swap her with any other slave in your possession.
If you don't want to use an existing slave, you can buy a mindbroken one from the Flesh Heap (or order a custom husk from the Flesh Heap). Alternatively you can also set the incubator to "prepare for bodyswapping", so that when the newly vat-grown slave is all grown up, you can immediately swap your slave in. It should also be possible to clone the existing slave, so she's basically just in a younger version of her body.
Although draw-back for the home-grown husks is obviously that this takes a long time (40 weeks + age of majority in weeks), so if your favorite retires soon, you'll have to rely on husks or an existing slave.
Although I'm not sure if this will actually prevent them from retiring, as they retain their old age and it just states "Age x. y year old body". You might need to research the immortality treatment instead, although I'm also not sure if that prevents retirement. You'll have to try that yourself, since I don't have any slaves close to retirement in my current games.