I learned "not to go" is right but sometimes I could find "to not go" what's correct?
ex) She said not to go there. ex) She said to not go there.
She said to not go there is a mixture of direct and indirect speech. For example maybe in direct speech, she said "Do not go there."
You could punctuate differently to see this:
John: What did your mother say about going to the club?
Mary: She said to "not go there".