The factory two year warranty goes with the VIN, not the customer name. The new owner will want to have the bike registered under his name with the MoCo however, to make sure he gets all recall notices. Dealers have a form he can fill out for that purpose, you don't have to sign that one.
The ESP Contract is your best and most up-to-date source for the procedure to transfer the ESP. To make things less confusing, try to refer to it as the Extended Service Program. It's not a warranty, even though many people call it one. If things are still set up as I remember them, there is a simple form called the ESP Transfer Request form. Once again, any dealership should be able to provide the form. This one both you and the new owner have to fill in and sign.
I assume you can also contact H-D directly to get the forms if you don't want to involve a local dealership.
Jerry