It looks like the Dukes Head existed as different addresses in 1841 and 1851. The publican, Robert Merrington seems to have a problem with ages.
York pub history index
Directory of Pubs in the UK, historical public houses, Taverns, Inns, Beer Houses and Hotels in Yorkshire.
Residents at this address
1823, Duke of York, Robert Merringateon, Aldwark
1829, Duke's Head, Robert Merrington, 54 Aldwark
1840, Dukes Head, Jno Moiser, 54 Aldwark
In 1841 at Aldwark, St John Delpike, York, Yorkshire
Robert Merrington, Publican, aged 40 and born in Yorkshire
Frances Merrington, aged 40
Susannah Merrington, aged 15 and born in Yorkshire
Mary Kirk, Independent, aged 60
Ann Thornton, aged 15 and born in Yorkshire
Jacob Herts, Hawker, aged 30
Henry Templeton, Hawker, aged 30
Lyon Lazarus, Hawker, aged 40
M Abrahams, Hawker, aged 50
In 1841 at 54 Aldwark, St John Delpike, York, Yorkshire
John Moiser, Inn Keeper, aged 55 and born in Yorkshire
Jane Moiser, aged 55 and born in Yorkshire
John Moiser, Printer apprentice, aged 15 and born in Yorkshire
1851, Dukes Head (Old), John Martin, 54 Aldwark
1851, Dukes Head, Robert Merrington, 53 Aldwark
In 1851 at Dukes Head Inn, 53, Aldwark, St John Del Pyke, York, Yorkshire
Robert Merrington, Innkeeper, aged 70 and born in Huntington, Yorkshire
Frances Merrington, Wife, aged 69 and born in Huntington, Yorkshire
Susanna Hunt, Daughter, Widow, aged 31 and born in City of York
Mary Sellers, House servant, aged 19 and born in City of York
1872, Dukes Head Inn, Thomas Dickinson, 65 Aldwark
1885, Dukes Head, John Marshall, 65 Aldwark