As someone who recently did this, you can link a Fastmail account to your existing Gmail account, and it will load in any email data you have into Fastmail. I think from there you can delete your google account provided you have Fastmail all setup properly. It took maybe 2 minutes and was part of the guided setup Fastmail did for me.