Yes. The problem is that the thermal conductivity of rock isn't great, so it needs to be in a "hot" area and to have some kind of underground fracturing allowing water to spread out and heat up.
An example: https://www.cnbc.com/2018/11/06/drilling-to-start-at-the-uks...
Not quite there yet: https://www.uniteddownsgeothermal.co.uk/future-programme
In both construction time and cost it's a bit meh compared to wind/solar, its only advantage is dispatchability.