Where would you like to use {{dueDate}} ?
You mention a VSM step, and there are a number of places in a virtual service where you can add your Java code to do this, depending on where you want to use it. It could be in a Router step (VSM), a scripted data set (VSM), a match script (VSI), a request or a response scriptable Data Protocol Handler (VSM), in-line in your response data (VSI) or even a custom JSR-223 step (VSM).
DevTest 8.0 - Scripting Guide - V1.1.pdf includes descriptions and examples.
The command:
testExec.setStateValue("dueDate", theDateYouCreate);
will put theDateYouCreate into a property that {{dueDate}} will retrieve, depending on where you put your Java code.