In the absence of any specific date in the question I have assumed we are looking for Union officers, surname "Walker", on
active service at any time between April 12, 1861 and April 9, 1865 when the war ended. This figure was
zero.
However in the months prior to the end of the war a number officers named "Walker" were awarded Brevet General ranking although none of these appointments were ratified prior to the end of the war, April 9, 1865.
Should we be looking to include brevetted "Walkers" then the figure becomes
four* with those officers listed below. The names of the four Brevetted generals named "Walker", with appointment date and confirmation are:
1. Lt. Colonel (Asst. Adjutant Gen. USV)
Duncan Stephen Walker, Bvt. Brig. Gen. USV,
March 13, 1865 and date confirmed April 10, 1866.
2. Major (Asst. Adjutant Gen. USV)
Francis Amasa Walker, Bvt. Brig. Gen. USV,
March 13, 1865 and date confirmed July 23, 1866.
3. Colonel
Moses B Walker, 31st Ohio Infantry Regiment, Bvt. Brig. Gen. USV,
March 27, 1865 and date confirmed March 12, 1866.
4. Lt. Colonel
Samuel Walker, 16th Kansas Volunteer Cavalry Regiment, Bvt. Brig. Gen. USV,
March 13, 1865 and date confirmed July 23, 1866.
* Finally, a fifth "Walker" became a Brevet General
but not until three months after the war and as a result I have not included him.
5. Colonel Thomas McCormick Walker, 111th Pennsylvania Infantry Regiment, was not made Bvt. Brig. Gen. USV, July 5, 1865 and date confirmed March 12, 1866.
You pays your nickel and you takes your choice!
Sources
https://en.wikipedia.org/wiki/List_of_American_Civil_War_generals_(Union)
https://en.wikipedia.org/wiki/List_of_American_Civil_War_brevet_generals_(Union)