Hey there!
Your answer is D. a letter.
Transitive verbs are verbs that are used with an object. It refers to the person or thing that the verb's actions affects.
Therefore, option D is correct. The soldier (noun) is carrying out the action of writing the letter.
Hope this helps!