Several energy suppliers websites have pages dedicated to this very topic.
The current 2035 target originates in the ministerial Heat and building strategy policy paper (2020):
"Our ambition is to phase out the installation of natural gas boilers beyond 2035."
In the Annex:
Aiming to phase out the installation of new and replacement natural gas boilers from 2035, once costs of low-carbon alternatives have fallen, in line with the natural replacement cycle, including any hydrogen-ready boilers in areas not converting to hydrogen, to ensure that all heating systems used in 2050 are compatible with Net Zero.
Given the energy policy of the UK, which to many engineers makes absolutely no sense at all, it's impossible to predict what will actually come out of the policy sausage factory next.
Eventually everyone will need to switch from gas because as the number of heat pumps rise then number of gas consumers fall and the infrastructure costs for them will become uneconomic
England: from 24 March 2027
Scotland: since 1 April 2024.
The legislation doesn't mandate heat pumps specifically, it mandates >=75% lower carbon emissions than homes built to the 2013 standards, which effectively requires heat pumps, solar panels, and significantly improved insulation. Build and running costs aren't measured, it's quite possible new homes will cost more to buy and run, and could be smaller to compensate.
You remember "2035" because in 2021 the government announced it "wanted" to ban gas boilers entirety by that date: https://www.bbc.co.uk/news/business-58959045
... but as far as I know, never enacted legislation to ban their sale or fitting in existing houses. And that aspirational policy has been announced as dropped multiple times, at least since last July, most recently today