Virtualbox Shared Folder: specify which uid/gid to use on the host, for files created on the guest

I can't tell how to change the gid from Virtualbox side, but you can use the special gid (sgid) to the shared directory, so that every file created or copied (beware, not moved) in there will have their group ownership set to that of the directory.

I'll assume that the shared directory is /shared.
First ensure that the shared directory's owner and group is set to johnd:
sudo chown johnd:johnd /shared
You can add -R to propagate to objects inside.

next,
sudo chmod g+s /shared

Any file created in /shared will be set the group ownership to johnd.