I have a task where when an item is added on a document library, there will be a retention of the item. After 1 year it will be delete on that document library and then transfer to a different document library which is an archive document library.
Looking at the question, you are trying to do what the SharePoint retention policy settings do with a workflow. Did you try setting up retention policy for your document library? Article on how to do is here
Also, I wouldn't recommend workflow instances running for a year on your document library. Either set up some external archiving Powershell script as scheduled task to move documents out or set up retention policy.