https://www.fold3.com/search/#s_given_name=John+W&s_surname=Jac...
I seeing bunch of confederates so not sure if it him
re: Confederate vs Union
That's what I wondered, too. FindAGrave currently has 6 John W. Jacksons with memorials in 6 different locales, all born the same year.
The originally-referenced John W. married a woman from Ohio, which also leads me to think he was not a Confederate soldier (they were classified in the 1880 census as mulato).