this is exactly what happened to me, by age 3 I was ready to quit and by 3 1/2 i was trawling the net to find a way to wean an d luckily found this forum and here found the encouragement here to continue. But I did mother lead weaning (or at least nudged him strongly in the drectoin of weaning) over a period of 5 or 6 months starting when he was about 4 1/2 and we finished when he turned 5 because I simply could not imagine going on any longer being a closet nurser. On his own I believe he would have gone on at least another year, he says he would have quit with 6, but I could not.I am afraid we're going to get to the point where I really DO want to wean (maybe around age 3 or so) and yet he'll still be so attached to it that it will be very, very difficult.
But honestly at age 3 I don't think it would have been possible without drastic steps (eg me going away for a week or something like that) which I was not willing to do. Children are of course all different but it seems to me from reading the various stories in this forum that around 3 is the hardest age to wean.
I know it sounds trite to say take a step at a time. But really there is no knowing how it iwll go for you and how your child will develop. That he nurses much now can change in a few months.