Most of the forums and blogs I came across when troubleshooting this issue referred to workflows created in SharePoint Designer and then imported into Visual Studio before deploying. They refer to removing the lines containing the AssociationUrl, InstatiationUrl and ModificationUrl.
I did not have any of these lines in my xml files so obviously that was not my issue.
On further troubleshooting I noticed some conflict between the existing content types (from a previous version of the workflow) and the new content types being created.
As a workaround to this issue, when adding the workflow I selected a new Task list instead of using the default task list.
I now no longer received the above error and the workflow is working correctly.
I will continue investigating the issue regarding the conflicting content types. I will update this blog once I know more but for now I have a working workflow.