Hi @Hextia,
I’ve not used the Javascript SDK, but looking at the sample code here, it looks like the UpdateTask method takes the body as the first parameter and the task ID as the second, which is the opposite of what you have in your code.
EDIT:
Further to my point, it looks like this person had the exact same issue: Unable to update custom field value in a task using the node library - #3 by Scott_Beeson