These two men showed up in a search. Here is their information from the state's site. The first one's age matches what you think is true about your John's birth year.
Note, there may have been others. If I remember right, the first man didn't show up in the search by name. The first site I found him on gave his Unit and Company, so I looked for him that way.
No guarantee that either of them is your John McGuire.
Illinois Civil War Muster and Descriptive Rolls Detail Report Illinois State Archives
Search Criteria: 7 IL US CAV and B
Name
Mcguire, John
Rank Pvt
Company B
Unit 7 Il Us Cav
Personal Characteristics
Residence Auburn, Sangamon Co, Il
Age 18
Height 5' 5 1/2
Hair Black
Eyes Black
Complexion Fair
Marital Status
Occupation Farmer
Nativity Ireland
Service Record
Joined When Jan 23, 1865
Joined Where Springfield, Il
Joined By Whom Cpt Keys
Period 1 Yr
Muster In Jan 23, 1865
Muster In Where Springfield, Il
Muster In By Whom
Muster Out Nov 4, 1865
Muster Out Where Nashville, Tn
Muster Out By Whom Cpt Chickering
https://apps.ilsos.gov/isaveterans/civilmustersearch.do------------
Search Criteria: Mcguire, John
Name
Mcguire, John
Rank Pvt
Company E
Unit 19 Il Us Inf
Personal Characteristics
Residence
Springfield, Sangamon Co, Il
Age 28
Height 5' 8 1/2
Hair Brown
Eyes D
Complexion Fair
Marital Status
Occupation Laborer
Nativity Down, Ireland
Service Record
Joined When Jun 4, 1861
Joined Where Chicago, Il
Joined By Whom Cpt Raffen
Period 3 Yrs
Muster In Jun 17, 1861
Muster In Where Chicago, Il
https://apps.ilsos.gov/isaveterans/civilmustersearch.doThere is a tree at ancestry for a Thomas McGuire, born 1839 in Ireland. His wife's name was Rosa Tierney. The tree says Thomas was the son of Timothy McGuire and Mary Maloney and had siblings Ellen, John, Kate, and Ann. Ellen is said to have been born in 1838, but there is no information at all for the other siblings. The tree didn't have Thomas' place of birth, other than Ireland.
This is Thomas' page on findagrave. Maybe some information will ring a bell.
https://www.findagrave.com/memorial/188850889/thomas-julian-mcguireThe records of the Springfield Catholic Diocese are on ancestry, and I didn't find your Katherine or Mary being baptized in Springfield in 1875 +/-5 years. Thomas' daughter Kate was there, so the search does work. I didn't find a marriage for your John and Mary in Springfield in those years either.
A Mary I McGuire, daughter of Richard Maguire and Mary Bradley married Thomas E White, son of James White and Margaret Casey or Carey on May 25, 1881, at Immaculate Conception Cathedral in Springfield. Witnesses were Thomas Corkery and Mary A Crudden.
Your Mary probably remarried soon after John's death, if she had two young children. That might be her, but only if her maiden name was McGuire also.
Burials are not in the register.
I didn't find the family in the 1880 census in Springfield, which John should have been on if he didn't die until November.
Do you know Mary's maiden name? It will help if you start looking for daughters Kate and Mary on later records.