You can easily transfer the contacts through iCloud. Firstly enable the iCloud option on your iPhone.
Go to Settings > iCloud and sign in with your iCloud account. Go to Contacts and swipe them to ON. On your computer, open icloud.com and then click Contacts. Click the gear on the left size and select to Export as VCF file.
Open a browser on your computer and access http://contacts.google.com then use use the More actions and select IMPORT. Choose the VCF file and the contacts will be added.