The Equipment remains attached to the previous creature.
701.3a To attach an Aura, Equipment, or Fortification to an object or player means to take it from where it currently is and put it onto
that object or player. [...]
701.3b If an effect tries to attach an Aura, Equipment, or Fortification to an object or player it can’t be attached to, the
Aura, Equipment, or Fortification doesn’t move. [...]
Unattaching the equipment from the previous creature is part of the equip ability's resolution, not part of it's cost. Since the target of the ability is illegal when it tries to resolve, it does not resolve and therefore the Sword remains attached to the previous wielder.
Note: 701.3b does not apply in this case because the effect doesn't happen in the first place, but it helps reinforcing the idea that Equipment stays where it is unless explicitly moved.