OK, I would go with the Census data as two consecutive had identical names.
However, quite a few soldiers of the time were illiterate and the transcribing clerk many times had to rely on what they thought they heard.
I’ve seen quite a few transcription errors on both census and military records for those signing with an ‘X’ “his mark.”