If interest rates rise, the maturity of a bond doesn’t change. Neither does the time to maturity.
How do duration and time to maturity compare? Both decline as you approach a bond’s maturity, so they have that in common. The big difference is in how they are calculated. Time to maturity is a simple measure of time: How much time until a bond’s stated maturity date. As mentioned above, calculating duration is a bit more complicated. Interestingly, a bond’s duration will be equal to or less than its maturity.
So when you hear the terms maturity and duration, remember that they have very specific meanings for bond investors. For bond people, duration isn’t just about time.