We are able to get WSL 2 working with AFNI. The X11 display became more complicated with WSL2 because it's now done over a virtual network between the WSL environment and the native Windows environment. If you did want to try WSL2 again, then you would set the DISPLAY like this in your .bashrc file for the Ubuntu configuration.
export DISPLAY="$(/sbin/ip route | awk '/default/ { print $3 }'):0"
Also the X11 server under Windows needs to be set to allow for these connections. In VcXsrv, you would check the box for "Disable Access Control" and uncheck "Native OpenGL". MobaXterm is another X11 server that also works as a terminal application. You can set that to work also similarly to change MobaXterm settings and set X11 remote access to full instead of "on-demand". I expect/hope that the X11 server applications will eventually be a little simpler to use. Microsoft supposedly will integrate X11 at some point too.