If I went the tankless route it would have been over $5K.
If you live in New York it is an average price (sadly) All the requirements for workers comp insurance, liability, insurance to cover tools, permit fees (yes in NY you cannot get a permit without showing proof of WC and liability now)
And on and on and on and on.
I installed it myself, propane to code, replaced an old one in three hours.
In my area labor is a $100 an hour plus materials, expect a days labor for two people.