The NPS database lists...
John F. Whitfield
1st Alabama Infantry
Company K
Rank in : Captain
Rank out: Captain
This was "The John Gill Shorter Artillery".
John F. Whitfield
3rd Alabama Infantry
Company C
Rank in : 1st Sergeant
Rank out: 1st Sergeant
This was Captain Tennant Lomax's Company "The Tuskegee Light Infantry, later under the command of W.C. Swanson.
I believe Whitfield may have actually enlisted in Company G, "The Montgomery True Blues" as 2nd Corporal, under the command of Captain W.G. Andrews.
Barry