Seneca is discussing the nature of virtue and what it would take to achieve a perfect virtue as a human being. Such a person must be good to their friends but also restrain their dislike of their enemies. They must be equally devoted to both their political and personal beliefs, willing to suffer when required, and thoughtful and practical in action. Such a person must pay their debts and work hard when work is required of them. They must be consistent in these qualities, without wavering and with judgment that is always sound. Finally, and this most directly refers to the quotation you ask about, they must have cultivated such a habit of doing good and right that they are no longer even capable of doing anything that is not good and right.
This is the way to achieve perfect virtue, and it is not a big leap to get from Seneca's discussion of personal virtue to Wordsworth's discussion of personal duty. One who is quite virtuous will feel compelled, obligated even, to do their moral duty because it is the good and right thing to do. Therefore, the poem's speaker, who asks Duty to help him overcome his weakness, seems to be trying to establish the habit of goodness required of the perfectly virtuous person.