What do I need to power a 20V 3A device using "D" or "AA" batteries?
Batteries connected in series provide the sum of their voltage but at the current of the lowest rated battery.

Batteries in parallel (of the same voltage) provide the same voltage as one battery, but at the current capacity of all battery current capacities summed.

Your amplifier is rated at 20V/3A which means it draws 3A most likely at maximum volume. I would expect it draws much less at lower volumes. However, I will provide calculations based on the highest current draw.

"D" cells (batteries) store more energy (18000+ mAh) than "AA" cells (~2750 mAh), and therefore will last longer than "AA" cells for a given load.

If you connected 14 "D" cells in series, that would provide 21 volts (a 5% voltage increase should be tolerated by your amplifier, and as the batteries drain, they will be significantly lower than this voltage).

To address the current draw, you will need to connect additional sets of 14 "D" cells in parallel. Each set connected will increase the current capacity. With only one set, you have a theoretical maximum of 18 amp-hours, which means you could operate a 3A device for 6 hours. However, if you look at the datasheet for "D" cells, the mAh capacity is significantly reduced at high current draw. For example, at just 0.5 A, the mAh capacity is given as ~1500 mAh. This means that your 3A amplifier would only run for a half hour! It gets worse - because you are drawing much more than 0.5A, the life of the batteries is much less. In fact I would not expect the unit to work properly with only one set of batteries in series.

Ideally you would connect enough sets in parallel so that you are only drawing 25mA from each set, which gives the best-case mAh capacity. But this would require that you connect an impractical 120 sets; a total of 1680 "D" cells!

With 6 groups of 14 cells, each set would provide 500mA, and come much closer to providing the 1500 mAh capacity shown on the datasheet. I would expect a run time of about a half hour then.