No, do not use "distance to" in this phrase. "Keep your distance from " is the accepted wording. It means, trying to stay away from a bad situation or a bad person.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
AnonymousSay, "keep a respectful distance to the teacher".No.