Unfortunately there is no way to transfer ships. Trust me, I looked.
There are essentially two options you can take:
Find another place that sells the Imperial Courier (or whatever ship you want), and buy it there.
Sell your current ship at a 10% loss, and buy the new ship there. Just remember to sell all of your modules and replace the ones you can't sell with the cheapest possible. That way you'll lose a lot less moolah.
Personally, I would go with option 1 if you're currently in anything more expensive than an Asp (Although even a Clipper or Python could make up the loss in a couple hours worth of trading). I wouldn't even try for a station 400k Ls from the parent star. I won't touch anything more than 1200 Ls away as a personal rule of thumb, unless it's for a mission I need done.