Gerund does not equal infinitive
Some verbs can be followed by a gerund and an infinitive but the meaning of the sentence is different in one case than in the other. The links on this page lead to more detailed pages describing the meanings of different constructions of this type.