Trust breeds confidence. How do you have confidence in someone? A history or track record of trust is established. Trust births and grows confidence. I think the idea behind this passage was conveyed after the first sentence. "The one who trusts in the Lord, whose confidence is in Him" is "blessed". The rest of this passage elaborates on how one is "blessed".
If you are someone who truly places their dreams, plans, needs and desires in the hands of Christ Jesus, then these verses liken you to "a tree planted by the water that sends out its roots by the stream." You, the tree, knows where you get your nourishment, strength and peace from - the water of the nearby stream. Because of this confidence in what the water supplies, you, the tree, "does not fear when heat comes;" in fact the next part declares that when the heat arrives your "leaves are always green" - your witness, calling and attractiveness are still strong. In addition, "in a year of drought" - when things seem to be dormant/stagnant in your life, Jeremiah proclaims you are the kind of tree that "has no worries". My mind goes to Psalm 46:10 - "Be still, and know that I am God." for this time of our lives. As a bonus, God enables you, as the tree, to "never fail to bear fruit" - displaying and instilling "love, joy, peace, forbearance, kindness, goodness, faithfulness, gentleness and self-control" (Galatians 5:22-23).
So, we come full circle. The key is again at the beginning of the passage. The person who has no worries and no fear when challenging times come is someone who has allowed their roots to tap into the peace giving, strength giving and life giving water of the Holy Spirit. The individual who has a track record of trusting the Lord, will have a great confidence in Him when more challenging times come. "The one who trusts in the Lord, whose confidence is in Him" is The Blessed Tree.