Part of Marygate in York is to close while work on a flood defence is carried out.