read that "Work done by magnetic field is always zero"
This is misleading / not true in general. In macroscopic physics, (macroscopic) magnetic forces do work, for example magnetic force due to external field acting on current-carrying conductor $BIL$ does work when the conductor moves (such as in your example) and also this force can do work on magnetic bodies such as iron/steel bodies or magnets.
However, the quoted statement has a core of truth: work of magnetic force acting on a moving point charged particle (so-called Lorentz force) is always zero, because the force is always perpendicular to velocity.
This is consistent with the macroscopic physics, because work of macroscopic magnetic force on moving current-carrying conductor or magnetic body isn's simply sum of works of Lorentz forces due to external magnetic field; there are involved also induced internal forces between the current-forming charged particles and the rest of the conductor and these do the work. In current-carrying conductor, you can imagine them to be all the electric and non-electric forces that act between the mobile charge carriers (electrons) and the rest of the conductor.