The answer is found in the OT metaphor.
"“10 I found Israel like grapes in the wilderness; I saw your fathers as the firstripe in the fig tree at her first time: but they went to Baalpeor, and separated themselves unto that shame; and their abominations were according as they loved.” (Hos. 9:10, KJV)
Israel was compared in the first part to grapes, and in the second part to the fig tree. The comparisons define the metaphors used throughout the prophesies, and in the NT.
In Joel 1:6-7, Judah is described as the Lord’s land, the Lord’s vine, and the Lord’s fig tree.
“6For a nation is come up upon my land, strong, and without number, whose teeth are the teeth of a lion, and he hath the cheek teeth of a great lion. 7 He hath laid my vine waste, and barked my fig tree: he hath made it clean bare, and cast it away; the branches thereof are made white.” (KJV)
The land of Judah and Jerusalem, the remnant of Israel rebuilt after the Babylonian captivity was the Lord's fig tree.
John the Immerser told the Pharisees and Sadducees in Matt. 3:10, and in Luke 3:9 that the axe was already laid to the root of the tree, implying that Jerusalem and Judea were ready to be cut down.
As Christ was going into Jerusalem the second day after cleansing the temple, He stopped before the fig tree. Standing before Jerusalem, and standing before the fig tree was the same thing. The fig tree represented Jerusalem. Look at the parallel in Matthew.
“18 Now in the morning as he returned into the city, he hungered. 19 And when he saw a fig tree in the way, he came to it, and found nothing thereon, but leaves only, and said unto it, Let no fruit grow on thee henceforward for ever. And presently the fig tree withered away.
20 And when the disciples saw it, they marvelled, saying, How soon is the fig tree withered away! 21 Jesus answered and said unto them, Verily I say unto you, If ye have faith, and doubt not, ye shall not only do this which is done to the fig tree, but also if ye shall say unto this mountain, Be thou removed, and be thou cast into the sea; it shall be done.“ (Matt. 21, KJV)
The fig tree had no fruit on it, only the leaves. This fruitless tree, even though it was not the season for the fruit, represented the fruitless, barren and unworthy people of Jerusalem.
Christ made this judgment so that His disciples heard Him. They would remember later what He had said. The judgment of the fig tree was the judgment against Jerusalem.
“37 O Jerusalem, Jerusalem, thou that killest the prophets, and stonest them which are sent unto thee, how often would I have gathered thy children together, even as a hen gathereth her chickens under her wings, and ye would not! 38 Behold, your house is left unto you desolate.” (Matt. 23:37-38, KJV)
And the fruit of the fig tree was removed from Jerusalem “forever”. Just as Christ had told the Samaritan woman at the well,
“Jesus saith unto her, Woman, believe me, the hour cometh, when ye shall neither in this mountain, nor yet at Jerusalem, worship the Father.” (KJV, John 4:21)
the righteous men and women of God are now to be found in every nation on earth, for all those in Christ (Gal. 3:26-29) as all those in Christ are now counted for the seed of Abraham, and are now the Israel of God.
For more about the fig tree and trees of righteousness see the post "The Fig Tree and The Mountain" at my blog ShreddingTheVeil.