The duration of a 5-year and 20-year zero-coupon bond is 5 and 20 years respectively, because zero-coupon bonds pay no coupons and return principal at maturity, equating duration with maturity time.
The duration of a zero-coupon bond is the same as its maturity since there are no intermediate cash flows to consider. Therefore, the duration of a 5-year zero-coupon bond is exactly 5 years. Similarly, the duration of a 20-year zero-coupon bond is 20 years. This is due to the fact that zero-coupon bonds pay no coupon during their lifetime and return only the principal at maturity, making their duration equal to the time to maturity.
However, it should be noted that duration is a measure of a bond's sensitivity to interest rate changes. For zero-coupon bonds, the longer the duration, the more sensitive the bond's price is to changes in interest rates. In the context of bond yields as discussed in the figures cited, AAA corporate bonds offer higher yields than U.S. Treasury bonds due to the higher risk, but this discussion is separate from the concept of duration.