Not necessarily. Neutrons have a magnetic moment. As I understand it, there is a magnetohydrodynamic model of how a magnetar's field gets generated, which would require protons, but it's not the only model and we don't have enough data to be able to rule out other models.