Your Time Capsule was programmed with the correct settings to connect to your "old" router. When you connected it to your "new" router, the Time Capsule was still looking for the "old" router because it did not know that the device changed. So, the Time Capsule is lost and does not know what to do.
The solution will be to reset the Time Capsule using a Hard Reset or Factory Default Reset and then set it up again so that it will obtain the correct settings to work with your "new" router.
How to reset your AirPort base station - Apple Support
Then, set up the Time Capsule again using AirPort Utility on your Mac. You can use the same names and password for the Time Capsule if you wish, or set up a new name and password for the Time Capsule.
The bottom line......whenever you change the device to which the Time Capsule connects, you will need to reset and reconfigure the Time Capsule to work correctly with the new device.