It probably also depends on where you are and how deep you need to drill. It seems to be working out for Munich in Germany, there are a couple of city districts (including mine) that are heated by geothermal, and they invested in this since the early 2000s. Can't really find an english page for the whole project though: https://www.swm.de/unternehmen/geothermie