Go to your recent players and right click on the player you would like to avoid and there is an “Avoid as teammate” button.