I'm just up the road from York and go quite often. The railway museum is great and free entry
I don't think you'd have a problem taking him in the minster, it's always really busy anyway. But just walking around the outside is impressive if you're not keen on going inside.
The Yorkshire museum is good, not sure if it's any good for a 2yr old, but it has some lovely gardens with squirrels, peacocks and pidgeons/ducks to feed.
You can take a boat cruise down the river.
there's some lovely little gift shops in the shambles and round the minster, and definitely go to the fudge kitchen on low petergate - I used to work there - best fudge in the world
walk round the walls (but take him in his stroller as at some points there's no hand rail and just a drop on one side!)
i seem to think the york Christmas Market is there on the last weekend in November if you're still there then.
There's a big soft play centre just outside of town called creepy crawlies, that's really good for little ones
further afield you've got the Wensleydale railway which will start doing a Christmas polar express thing where you get to meet santa very shortly.
Monk park farm at Thirsk is a petting zoo (not sure if it's still open) but it's really good.
That's all I can think of but I'm sure there's loads more. York is lovely.