I wish I had direct access to an S5 to help--but in general, in the People/Contacts app, first select to display only your Device Account contacts. Then tap Menu, then look for the Import/Export option. Tap that, and select Export to Storage. This should export your Device Account contacts to a multiple .vcf file or a .csv file. Once the contacts have exported, tap Menu again, then Import, then select the file and specify to import into your Google account.
I apologize if the steps aren't exactly how they are on the S5, but that's the general gist of it.