"Wait there" just makes the Pokemon wait at that square, it doesn't make them do anything else.
If you want them to use their ranged attack and only that attack, simply deselect every other attack (make it so there's no little tick except next to their ranged attack when you look at their attack list). That way they'll usually stay a few squares away from the enemy and still attack.
You should also pack a lot of reviver and sleep seeds, just in case. It helps a lot.