If you think about it, transferring your consciousness to a robot only makes a copy of your mind. You still are conscious in your brain.
I mean like, we don't quite know what consciousness is but "transferring" it would likely include turning off your brain which means that you'd be effectively killing yourself and creating a copy of you to take your place.