The problem with this approach is that we only have evidence of ‘soldiers’ from the period of documented history, either oral or written. Division of labor (professions) have probably been common after large interacting groups settled to a common area, perhaps even before it. Assuming external violence, it is likely that some individuals have concentrated more effort on keeping others safe - guardians/‘militia’. In the case of intergroup warfare, also other individuals must have been involved, as in modern national wars where citizens are drafted.
As far as I remember, hunter-gatherer tribes in jungles make raids against other groups. It may be partly competition for resource-rich territory, partly an opportunity to show bravery and excellence in fight (increased social status), sometimes acquisition of resources, like humans for food.