How can i stop my character when it is in attack range like league of legends combat?

You could use the “AI move to” node, that has an acceptance radius input, could be what you’re looking for