Electron cyclotron resonance (ECR) neutralizer is a key component of electron cyclotron resonance ion thruster (ECRIT) with a diameter of 10 cm, which plays an important role in maintaining the spacecraft potential balance and neutralizing the ions in the plume region. Optimizing magnetic field distribution is an important way to improve the performance of neutralizer. At the same time, the uniformity of the magnetic field and the position of the magnetic trap can affect the magnetic field characteristics, plasma performance, electron extraction process, and beam current. Previous experimental researches showed that the beam current extraction performances of the two ECR neutralizers with different magnetic field uniformity and different magnetic trap locations are significantly different. However, it is difficult to reveal the physical phenomena and causes only through experiments, so numerical simulation is needed. Therefore PIC/MCC codes for the ECR neutralizers with different uniformity of magnetic field and different positions of magnetic trap are established. Under the given electron extraction potential, numerical simulations are accomplished to study electron extraction procedure and analyze its influence on the performance of the neutralizer. The simulation results show that when the magnetic field uniformity is low and the magnetic trap is located upstream of extraction orifice, the migration of electrons from the magnetic trap to the outlet is limited by the magnetic field and the electric field, thus a higher potential energy is needed to extract the electrons. Otherwise, when the magnetic field uniformity is high and the magnetic trap is located at the downstream of extraction orifice, electrons will be more likely to migrate towards the magnet trap. After the electrons reach the magnetic trap, under the action of the anode potential, the external potential is higher, and the external weak magnetic field almost fails to hold these electrons. Therefore a large number of electrons can be extracted at low extraction potential. This research will lay an important foundation for the development of high-performance ECR neutralizer.