"I thought of producing a movie."
Translation:Pensé en producir una película.
pensar de + object = to have an opinion about
pensar en + object or infinitive = to think about
Because we use the gerundio only when talking about currently being in the act of doing the verb. In this case the infinitive is used because the subject is not in the act of producing, but thinking about it.
If I am currently producing a movie, I could say estoy produciendo una película, but to say producing movies is fun, it would be producir películas es divertida. Or in the past tense, if I was in the act of producing a movie when something else happened, estaba produciendo una película cuando ocurrió algo muy extraño.
When we, as English speakers have an urge to use the gerund, we need to ask ourselves, is the verb currently being done? If the answer is no, then the infinitive is probably the correct way to go.