"Killed" is the standard term used to designate death on the battlefield. "Died" normally means death from other causes. However, in the example you described for Shiloh, the soldier probably died of wounds (mortally wounded) after the fighting ended.