The question is backed by good intentions, as if to say — have you found yourself a companion yet? ...because life will soon suck like never before. But it's highly invasive and makes a lot of assumptions.
Before they attack a civilization, the Borg send a collective audio message to their targets, stating that "resistance is futile", generally followed by a declaration that the target's assimilation is imminent.
"We are the Borg. Your biological and technological distinctiveness will be added to our own. Resistance is futile."
Yes, I just compared married people to the Borg Collective. The question "When are you getting married?" translates to "Come, join our collective of happy-ish married people". At the very same time, childless married couples themselves are under scrutiny for "not having kids yet" from an older generation constantly prodding them with — "When are you planning to have kids?"
When we were young, some of us optimistic fools rejected the idea of life being about a set of boxes to tick off — get a degree, get a job, get settled, get married, have kids, have grand kids, fall off the planet. Along the way, I've experienced friends turn around and cling to the formulaic path and praise ancient wisdom for showing them the path that works best. At this point, at least 3 billion people (out of a 7 bil world population) started out with the same rebellious intentions to live a unique and eventful life and went on to settle for what most people of the previous generation did. A thousand foot view of the situation on Earth would yield the same observations. At a micro level, someone may have married a little later than someone else, but the "milestones" they're knocking off are still the same. While /r/childfree's are an increasing bunch, in the context of the world population, it is just a minor blimp.
I've been guilty of asking the "When Are You Getting Married?" question myself...but I generally manage to avoid it. It slowly seeps into your go-to questions for making small-talk. I've also observed that my married male friends rarely ask this. It's always their wives...which makes me chuckle.
I was asked this question at a family wedding and naive-old-me decided to furnish a technically correct answer. When an aunt said I was next in line to get married since the only other candidate cousin is too young, I pointed out the timeline and order of my cousins who were already married and showed that their weddings were not in an age-ordered FCFS queue but a priority-queue. Those who wished to be married simply did so.
The aunt just nodded, smiled, and walked away silently. That's when I realized (I'm not bright) that she wasn't looking for her idea to be debunked but rather hoped I experienced marital bliss soon...whatever that is. We both had different ideas on what the wedding-queue led to — the garden of eden or a fiery volcano.
I needed a better answer. In software engineering, if you're asked how long it would take you to fix a tiny bug that you'd hate to work on, you wiggle out of it by quoting an absurd amount of time. Thus, scheduling it immediately would be unfeasible and, because you're generally busy, the bug ends up being prioritized in the long-term queue, until it's basically forgotten by everyone.
Since then, my answer to the question "When Are You Getting Married?" has consistently been — *drumroll* —
In the next 3-4 years.
"3-4 years. That's the plan". I say it with a straight face and with the utmost confidence.
What they end up presuming is (a) I have a girl in mind (b) I have a timeline in mind. I have received an occasional follow-up such as, "Who's the girl?" to which I respond with, "You'll know when the time comes". Case closed. See you in 3-4 years. There's no "Should we help in looking for girl?" and all that bullshit. No one messes with a guy with a plan.
People have a hard time remembering dates and vague statements such as "3-4 years". Politicians do this when they set long-term goals because they know of our faulty and short attention spans. You can say "3-4 years" each year for several years...it doesn't matter.
It's not a lie per se — it was a ridiculous question to begin with. They expected you to look into your future and give them a date. You gave them a rough estimate which may even turn out to be true, given that it's a moving window.