Yep, syntax definitely looks dodgy there.
However, I don't think you need to eject him first, unless you really want to.
The action command is actually movetocargo and not moveincargo.
unitname action ["movetocargo",vehiclename]
Will immediately move a unit to cargo.
If you order a pilot to do this, he will, and if the aircraft is flying it will no longer have a pilot unless there was a unit/units in cargo already, in which case they will swap positions.
Choppers sometimes fly erratically and even fly backwards when you swap pilots like this.
This works with player as well as AI.
Planck