A. If only I had done that task.
B. I wish I didn’t have to do that task.
Feedback To express disappointment with the present situation we usually use the construction [ I + wish + Past Simple]. Other answers do not relate to the meaning.
C. I would do that task if I had to.
D. I didn't want to do that task but I had to.