Try this:
Open the Phone, as if you were going to make a phone call and dial -
*#9090# -- Diagnostic Configuration (*#197328640# if that doesn't work)
Menu, select Key Input, enter Q
Menu, select Key Input, enter 0000
Wait for the next menu. (It takes a while.)
UMTS->COMMON->NV REBUILD->NV REBUILD->SYSTEM->PROTOCOL->GPS->IMS
or, if you don't have UMTS:
UE SETTINGS & INFO->SETTING->SYSTEM->NV REBUILD->ALL
Restart the phone.
If that doesn't fix it, the GPS antenna could be damaged or partly disconnected, or the GPS receiver is bad, in which case I'd replace the phone. That's a lot cheaper than paying a ship to replace the motherboard.