My question is my doubt. What is the correct structure?
I believe both are grammatically correct.
IMO, "not to do" puts more emphasis on negation whereas "to not do" focuses on the verb itself. For your sake of using imperative as a prohibition/restriction, here are my suggestions as samples:
I told you not to take it outside! (Remember not to take it outside)
I told you to not throw it out! (Remember to not throw it out)
In terms of speech, stress would play a big role to convey the style and clarity.
P.S. When in doubt, always think back to Hamlet:
To be, or not to be...
Both will probably succeed in expressing what you want. I would recommend: "remember to not" however because of a distinction that probably won't matter here but has philosophical import.
In Latin and medieval philosophy, there's a distinction between volo, non volo, and nolo ("I will", "I do not will", "I will against" or "I will not to"). In the case of verbs of will, there's a clear distinction between cases where you will to do something, you will to not do something, and you will not to / will against doing something. In such cases the sequence matters as to what's being negated.
I will to eat ice cream
I will to not eat ice cream
I will not to eat ice cream
Depending on the language user, a distinction might be meant between the second two with "will to not" being an act of will whose content is "to not eat ice cream" whereas the latter becomes a negating act of will against the idea of eating ice cream.
My sense, however, is that this distinction will be utterly lost and meaningless in all but the most technical contexts and then only for a subset of verbs related to willing and thinking. I think remembering might qualify as one of those.
So I would recommend "remember to not ..." and would not recommend "remember not to" for fear that the negation will be applied to the remembering rather than to that which is to be remembered.
a classic negative "do this" dialog comes from Hamlet:
For who that's but a queen, fair, sober, wise... would from a paddock, from a bat, a gib... such dear concernings hide? Who would do so? No... in despite of sense and secrecy... unpeg the basket on the house's top... let the birds fly, and like the famous ape... to try conclusions in the basket creep... and break your own neck down.
Hamlet tells mom (Gertrude) "go ahead and squeal on me to that rat king like any reasonable person would..."
Modern English equivalent: For who but a queen that's fair, sober, wise… would hide from a toad, from a bat, a tomcat... such important secrets? Who would do so? No... give in to common sense and the urge to tell… open the basket on the rooftop… let the birds fly away, and like the famous ape… to try to fly yourself climb into the basket… and break your own neck on the way down.