Is "fighting" used as a gerund in this sentence?

A soldier’s death is a reminder that more Americans have died fighting the Taliban in 2019 than in any other year since 2014.

TLDR:

It’s difficult to answer your yes–no question directly because I’m not sure what you think being a “gerund” is supposed to mean in English, and because this is not a term that’s used much in modern English grammar.

So what I will instead do is explain these two things you need to know:

  1. What that word’s part of speech is: it’s a verb because it has a direct object argument.
  2. What its clause’s grammatical role is: it’s an adverbial because it’s modifying not complementing another verb.

Your original sentence is a complex declarative sentence containing not just one main clause but also two subordinate ones. It also involves an embedded than-comparison with an absent but recoverable verb of its very own, but we won’t talk about that here.

Your sentence’s main clause necessarily uses a tensed finite verb, but only one of your two subordinate clauses does so. The other subordinate clause instead uses an untensed nonfinite verb, and it is this nonfinite subordinate clause which you’ve asked about, the one containing an ‑ing verb.

As far as parts of speech go, the word fighting in your sentence is neither a noun nor an adjective; it is clearly a verb. You can know this with absolute certainty because fighting has a direct object, and having direct objects is a property peculiar to verbs alone (and to active transitive verbs in particular).

Fighting is the verb of the nonfinite clause fighting the Taliban and other insurgent groups. Like many nonfinite clauses, this one has no grammatical subject. It does, however, have a grammatical object, because its direct object is the Taliban and other insurgent groups.

However, your question suggests that you want to know more than one word’s part of speech taken in isolation. You appear to be interested in learning the grammatical role which that entire phrase is fulfilling as a syntactic constituent.

Nonfinite clauses are able to serve in any grammatical role normally fulfilled by substantives (like nouns and pronouns) or by modifiers (like adjectives or adverbs). So now we need to figure out whether your entire clause here is acting in ① a substantive role or ② in a modifier role.

The answer is that the second of those two possibilities applies. It’s acting in a modifier role because one syntactic constituent is itself modifying another syntactic constituent.

In particular, your fighting clause is acting as an adjunct to the other subordinate clause, the one with the finite verb have died. Because your clause is an adjunct to another clause, syntactically yours is a modifier. Only if yours had been been a core argument to that other clause’s verb (like by being its subject or direct object) would it have been used in a substantive role. But it isn’t one of those. It’s only a modifier.

Modifiers of verbs are — by virtue of simple definition — always classified as adverbial modifiers, never as adjectival modifiers. (Only in rare cases can adverbs modify nouns, but this is a verb that’s being modified here, so there’s no question of that anyway.)

So your fighting the Taliban clause is itself an adverbial phrase that’s modifying the verb phrase have died. It’s limiting that verb by saying how the Americans who died did so.

Once upon a time this clause would have been called an adverbial participial phrase under outdated grammars of English. But modern English grammars avoid words like gerund and participle, especially when trying to describe a verb clause like yours. Often modern grammars prefer the fused term gerund-participle for the verb’s ‑ing inflection in nonfinite verb clauses like yours here.