TT #328 · Parashas Shoftim · Seventh Aliyah · Passuk 20:20
Only a tree that you know is not a food tree – that one you may destroy and cut down, and you may build a siege-work against the city that is making war with you, until it falls.
Torah Temimah points to Sifrei Devarim 203.
TT lemma: רַק עֵץ אֲשֶׁר תֵּדַע כִּי לֹא עֵץ מַאֲכָל הוּא.
English: ‘Only a tree that you know is not a food tree’ – that one it is permitted to destroy.
Derash distinguishing fruit and non-fruit trees (Sifrei) — only non-food trees may be cut for military purposes.
Trees that do not produce food may be cut down and used to build siege-works against the city.