Entanglement evolution and distillation under a local magnetic pulse