A converting mob is always placed in the second slot after converting. (This means if the mob was already there it won't switch places so the order of my reproduction steps is important)
Steps to reproduce
Place a boat
Put a villager inside
Put a zombie inside
Wait for villager to convert
Observed Results
Zombie and Zombie Villager switch places
Expected Results
The mobs wouldn't switch places
I can confirm.
no matter the old order of them, the converted mob always be the last one.
in minecraft/world/entity/ConversionType.java
because the converting code just let the old mob stop riding, then let the new mob start riding, so the new mob is always the last one.