It is commonly accepted that the blessing you refer to is only on the blossoms that lead to fruit on the fruit trees. See Mishna Berura OC 226 sk 2 based on Halakhot Ketanot 2:28.
There is another blessing on nice 'creations' (including trees) but some avoid saying that blessing entirely lest this not be the nicest creation they have ever seen.
Update for Nissan 5780 during the coronavirus pandemic:
I say "commonly accepted" and cite R' Yaakov Chagiz's Halakhot Ketanot, but it's worth noting that that is the earliest the requirement for fruit trees is mentioned. No Rishonim mention it. He says his reasoning is recorded only in a non-extent commentary of his to the Shulchan Arukh, so we can't say anything definitive, but it seems to revolve around the meaning of particular phenological terms recorded in this context. In that light, it's worth noting as well that the Talmud's term for the trees מלבלבי, commonly translated as blossoming, consistently parallels in the Targumim the biblical root פרח, commonly translated as flowering; however, there is much confusion surrounding applying these terms since in rabbinic and likely biblical Hebrew that term meant something more like sprouting or budding (see Zohar Amar's article in Tehumin 38 and cf. Gen 40:10, Num 17:23 with Rashi/Re"em vs. Rasa"g, Pro 11:28, Can 7:12, Rambam Sheviit 7:5, Kilayim 6:9, Orlah 1:7, Radak Shorashim פרח; a survey of biblical Israeli trees (grape, fig, pomegranate, olive, date) shows that indeed blossoming, when present, doesn't tend to happen until after Nissan and Chazal elsewhere still depict the onset of spring using those trees (Pirkei DeRebbi Eliezer 51) and greenery in general (RH 11a); plus we all know our Lulavim on Sukkot don't have flowers!)
Accordingly, a few modern Poskim permit reciting your referenced blessing on non-fruit trees if no fruit trees are available (see Vaya'an Shemuel 4:3, cf. Shevet HaLevi 6:53:4 and Teshuvot veHahagot 7:27:13). If you are in a medical quarantine then CYLOR if this option is appropriate for you.
Does a tree that blooms but doesn't produce fruit get a bracha?
Are you asking about a tree (belonging to a fruit bearing species) that blooms but does not itself produce fruit, or are you talking about a blooming tree from a non-fruit-bearing species?