Are you trying to run to3d from the same window that
you just ran afni, or have you started another 'Cygwin'
window? Make sure that you are running the command
from one of the xterm windows that is opened after you
run the 'startx' command.
The thing I would like to be positive about is whether
you can run the 'afni' command successfully, and, in
the same window, run the 'to3d' command with such a
failure.