The former is correct. The latter (bolded) is morally equivalent to the view that law is necessary to create the New Soviet Man or the Perfected Aryan Race.
The intention to lead man to virtue is not a moral defect in itself, it is, in fact, another virtue. However, as one goes about this task, one has to (1) have a proper concept of virtues and (2) lead by moral means. The Soviets and the Nazis lacked both.