The mayor of York and North Yorkshire made the pledge following a number 10 announcement of £415m to improve trains across the Pennines.