There are some odd text outputs that system output; they have shown up once before in a thread, but I'm not sure how problematic those are.
I think you might have added the path+program to your path:
software/afni/21.1.07/afni
... rather than just the path:
software/afni/21.1.07
("which afni" outputs both the path and program name.) Could you try adjusting that, and opening a new terminal, and see if that works?
I am not sure that will resolve it, because tcsh is your login shell, and I do already see elsewhere in the $PATH output just the /software/afni/21.1.07 path.
Might have to ask the mighty @rickr for his opinion here...
On a side note, but which might be relevant: that version of AFNI is also quite old, and should really be updated. I expect there are improvements to @SSwarper since then (as well as other programs), and also we have an updated program sswarper2 that is preferred in its stead (almost all same options, and same output structure).
--pt