I looked at the other John Miles (from Kentucky). His FamilySearch profile says he was born in Trimble Co., KY. In every census, he lists his birth in KY. Alsok his census records from 1850 on all are KY residence.
This does not look to me to be the same person as who served in the 106th. I cannot see a guy with a family from Trimble Co. KY enlisting in Malone, NY.