These are ambiguous sentences, with unclear meanings. This is a well-known problem in English. It is tricky to say someone "did not do something" + "for a long time". You can perform an action for a long time. But what does it mean to "not perform an action" for a long time?
It could mean at least 2 different things:
(1) You avoided doing that action (and continued avoiding it for a long time)
(2) A long time occurred, during which time you did not perform the action
Those are different meanings. A native speaker will say one or the other, but will not say an ambiguous sentence. So we might ask:
1. Why did you turn down all movie roles for a long time?
2. Why was there such a long gap between your movie roles?