Questions about using "to+ ing"
I heard this sentence in a film:
We are one step closer to ending this.
I do not know why we have to use "ending" instead of "end".
Is "Step to" a phrasal verb?
Often, one finds oneself explaining that the word to preceding (often, but not necessarily, immediately) a verb form is not the preposition but the infinitive marker:
I want to go there.
Is it all right to eat in here?
Try to / and keep awake.
To see is to believe.
To err is human, to forgive, divine.
Their mission was to boldly go where no man had been before.
Notice that the verb form following the to is the base form; together with the infinitive marker, this constitutes the 'to-infinitive' form of the verb.
However, the to used here is the preposition (or arguably, particle - close to can often be replaced by near - and closer to by nearer - making close to a multi-word preposition):
We are closer to Denver than we were.
We are three miles closer to home.
We are one step closer to a lasting solution.
We are one step closer to ending this.
As Gulliver says, ending here is a word with both noun and verb properties, but the to is not the same word we use in I want to end this now.
Here, step means stage, and one step closer is a set phrase.
Here, the gerund ending is used, but you could also say the end of this. The -ing form is a bit like a noun.
In this case to is a preposition, not the first half of an infinitive. We can say "We are one step closer to the end of this" with the same meaning.
Here, to is a preposition of the adjective closer, and after preposition usually gerund is used.