So, when I say, “I used to go there”, I mean that I had a habit of going there. “I was used to the weather” means that I was accustomed to the weather.
Now, “I was not used to the weather” means that I was not accustomed to the weather. Here, the auxiliary verb is “was” which does not modify the verb. But the auxiliary verbs, “did” and “did not” modify the verbs in the sentence, when used. The auxiliary verbs, “did” and “did not” function as constant modifying auxiliary verbs which always modify the tense of the sentence to simple past tense and hence we do not place other verbs in the sentence in the past tense but in simple present tense. The task of embedding the sentence into a simple past tense form is always done solely by the auxiliary verbs “did” and “did not”(didn’t).
So, “I did use to go there” and “I did not use to go there”, both are correct.
The two sentences can also be respectively phrased as, “I used to go there” and “I used to not go there”.
But grammarians dictate that both, “I did not use to…” and “I did not used to…”, are correct and acceptable.