The £5.2 billion over five years will mean 2,000 new flood defences in England, the Treasury says.