Ok the GPS started working again. I let the phone drain out of battery, then put a charger and let the sony logo show till the charge gets around 80% (Just left it for 20-30 minutes on charge). Then I removed the charger and hard reset the device(hold power and volume up key for few seconds). The device will shutdown and then restart it normally. Google will ask if you'd want to permit google to collect anonymous location data. Press allow and check GPS by opening Google maps app, it's working :-)
PS: Dunno what worked here(probably the hard reset step), but I put all the steps just in case.