Basically this points to them wanting to know two things:
they, like many companies, don't like turnover: how much are you invested in the job, what are the risks that you jump off quickly?
as really well said in the previous answer: its also about knowing if you care about the company; alternative questions in the same mould are: what do you know about our company, or, why our company and so forth
As for the answer: don't give precise years - nobody knows; in further interviews, if confronted to the same question, express that you want your collaboration to be long term, all things considered. But that you are mostly interested in the "now", and you don't want to quantify in years precisely because that is not how life goes. Something around that at least.