Let’s say a ranger casts spike growth (up to 10 minutes), then realizes it is useless since the enemy is able to fly. Can they end the spell prematurely?
It is a concentration spell, so yes
Simply dropping concentration (which takes no action, per the rules on concentration) ends the spell prematurely, unless the spell description overrides what happens when concentration ends (as conjure elemental does).
If the spell is not a concentration spell, you can end it early if the spell description says so, but there is no general rule allowing non-concentration spells to be ended early. (Note that the Duration section of the spellcasting rules does not mention being able to end non-concentration spells early.)