Numerical simulations of plasma confinement in "minimum-5" and "zero-B" magnetic traps for ion sources based on the electron cyclotron resonance phenomenon are carried out. The traps are formed with identical magnetic elements. The "zero-B" trap, whose principal characteristic property is total absence of magnetic field in its central point, is composed of two cusp systems. The first one of two magnetic discs directed at each other by the same poles forms a longitudinal cusp field, and the second one comprises a magnetic multipole that creates a transversal multicusp configuration in the space between the discs. The magnetic configurations of these traps differ only in the fact that the magnetic discs form a field of the longitudinal mirror type in the case of the "minimum-B" trap. A three-dimensional simulation method using particles with a leap-frog technique shows that the plasma density in the central active zone and the confinement efficiency of the "zero-B" trap are significantly higher than in the case of the "minimum-B" one.