Settings>Logic Rules.
Click on the arrow besides the avatar of a pokemon and select "Transfer but keep 3 of (Pokémon name) with highest IV" and look to the right, you will find the "Search Replace..."
Change Action to Transfer and Keep on highest IV and CP then type how many pokemons you wants to keep (in this case for you, its 1). Click Add to multiple... and then Replace.
You're now done