What does the length of the string (in a pendulum) have to do with resonance?
When you lengthen the string or rod of a pendulum, you weaken the restoring force on the pendulum’s weight. That weight must then drift farther from its equilibrium position to experience strong restoring forces. The result is that the pendulum swings more slowly through its cycles (its period increases and its frequency decreases). But no matter what the string’s length, the pendulum will exhibit a resonance. The frequency at which this resonance occurs is all that changes.