GPS works on the surface of the ocean. But the radio waves cannot penetrate water very far, so it fails if you are submerged (few things can which is why subs are so well hidden compared to aircraft.
Unless a nuclear sub was specifically sent to the area to look, it is very very unlikely to just be "in the area". Even if it were there, it is very hard to find a small metal box on the bottom of the ocean. There is no real sensor for that. Most military subs are not designed to dive beyond about 500m depth (there is no need, 100m is more than enough to be functionally undetectable from the surface). The titanic is at about 3800m. So they likely could not get anywhere near close enough.