This data has a few unusual aspects. First, both the input datasets are single slice data. Also the intensity values vary between both types of data by orders of magnitude. The functional data as you have posted it is masked to a single oval shape. If you're able to provide a mask for the spinal cord of another oval, then the problem becomes pretty easy to solve with this 3dAllineate command.
3dcopy AFNI_test_base.nii AFNI_test_base
3dcopy AFNI_test_input.nii AFNI_test_input
3dAllineate -base mask+tlrc -input AFNI_test_input+tlrc -cost ls -weight mask+tlrc -prefix i_al -1Dmatrix_save ib.aff12.1D -final NN
Here I'm ignoring the anatomical dataset completely and only using the mask. Least squares and nearest neighbor interpolation seem to work best, but other options work reasonably well too. You can choose to limit the warp to shift only or shift and rotate too.. You may also want to nudge the datasets manually using the Nudge plugin. That doesn't work with single slice data, so you will have to fake a volume with 3dZcat.
# use the same dataset twice to get two slices (HEAD,BRIK)
3dZcat -prefix base2 AFNI_test_base+tlrc.*
3dZcat -prefix input2 AFNI_test_input+tlrc.*