Yes heat pumps work in very old buildings.
Here's an 11th century Norman church in Lympne, Kent that has been fitted with a heat pump.
My own 1880 Victorian house had a heat pump fitted in 2019 and it works very well.
More on why heat pumps work in old buildings in my piece here 👇
https://www.carbonbrief.org/factcheck-18-misleading-myths-about-heat-pumps/