Sorry, this isn't the same John M. Goodwin. I know this because I ran into this question previously. The John M. Goodwin you are looking for was in Co. B of the 22nd Alabama. Information about him is available on Ron Goodwin's website on the Southern Goodwins, which is accessible through http://www.rootsweb.com In fact, you will find extensive information about your Goodwins there. I will post the exact URL later. I am supposed to be working now!
Kitty