Many things change the final price. The kind of water heater you pick matters. Tankless models often cost more than tank models. The labor to remove the old unit and put in the new one adds to the cost. Permits from your city may also be needed. These also have a fee.
Always get a few quotes from local pros. Ask what each quote includes. Make sure it covers the new heater, labor, and any permits. This helps you plan your budget well. It also helps you avoid surprises.