You can't as "value" is the display value.
Only way you be able to do it is intercept the form submission and prepopulate with default values if none are entered.
Failing that, the best place to hand it would be at the server end, ultimately where this kind of thing should happen.
That said, you should never rely on JavaScript to set/enforce default values as the user may not have JavaScript enabled or worse they are manipulating before sending it to you.
In that respect JavaScript should be considered dirty.
On second thoughts, you could do this:
<input type="hidden" name="distance" id = "disatance_default" value="0" />
<g:textField name="distance" id = "distance" value="${tripInstance?distance}" min="0" class="number" />
I think, if nothing was entered into the "textField" it wouldn't get sent back to the server, and therefore the hidden input field with the same name would take precedence.
The last most field of that name (which contains a value) will always be the one that is sent back to the server.