To see if it truly is a bad ground, I'd use a jumper wire from a known good ground to connect directly to the water heater and thermostat. If they then work, you can either pursue the search for the bad connection or just string a new ground wire to replace the bad one. Unfortunately builders of RVs don't often make all connections in accessible spaces so it might take more work to find it than to run a new wire.