Starting Sept. 5, 2014, Genealogy.com will be making a big change. GenForum
message boards, Family Tree Maker homepages, and the most popular articles
will be preserved in a read-only format, while several other features will
no longer be available, including member subscriptions and the Shop.
Have you researched the censuses to see where he was born? Checking the censuses from 1910 on back might help you to determine where he lived in 1860, which would determine from which state he served. That state might have military records so that you can get the pension record for Thomas RILEY/RILLEY.
BTW, my ancestors came to McCook Co., from Vernon Co., WI. It's fortunate that your ancestor was already in South Dakota. :-) History of the county says that in 1881, Thomas & James RILEY stole $92 from a store, deposited $200 bail each, and "fled to some of the western territories." Other RILEY names in the index are Aaron, Anna, Arthur, Augusta C., Cyrus F., Edward, Hugh B., John, R. S., Robert N., Sarah, Wm. & Wm. F. L., & S.