Prices vary, but at the time of writing, our current favorite pool heater is around $1,799 on Amazon. As with all heaters, the more heating power it delivers, the more you'll pay. For example, a similar model from the same manufacturer delivers 266,000 BTUs of power compared to 150,000, which increases the price by around $1,000.
There are more modestly powered options that cost a lot less: for example, a mini pool heater with 9,600 BTU costs just under $400. But with that lower price comes massively reduced heating power, and it wouldn't be appropriate for larger swimming pools.
It's important to consider running costs, too. Electric pumps can be relatively cheap compared to natural gas models: imagine a whole bunch of gas barbecues running at the same time, and you'll get the idea. A Weber gas grill delivers about 13,000 BTU of power, but some gas-powered swimming pool heaters deliver more than 250,000 BTU.