not so much a specific amount of time, instead it is more of sequence of events.
KIA is immediate death on a battlefield, or in cases of a ship/plane overdue and presumed lost, often the entire crew would first be classified MIA, then after a period of time/searches, changed to KIA.
Died of wounds is for those that survived the initial combat wound, but died shortly afterward, usually after receiving medical aid, as a result of those wounds. this gets into a gray area of what constitutes shortly afterward....
if being treated in the field by a combat medic, or getting first aid by a fellow soldier and died, KIA seems appropriate.
if transported to a field medical unit and died after receiving medical care from the doctors/surgeons, that falls more under Died of Wounds since that means it has been hours/days since they were wounded.
the gray area comes into play when someone was wounded and left on the field, dying hours later with or without some kind of medical aid. for instance, the unit was under fire and no one could get to the wounded to aid/evacuate them, a patrol was isolated and location/status unknown, etc.
in a lot of cases, we do not have to make the distinction, we use whatever status is given by that service/government when recording the death of the service member. for instance, we do not make a distinction between killed in action and killed by friendly fire.