Cantrips are spells, so green-flame blade is a spell and you can reroll its fire damage
To quote the feat:
When you roll fire damage for a spell you cast, you can reroll any roll of 1 on the fire damage dice, but you must use the new roll, even if it is another 1.
So the question is whether green-flame blade is a spell. To quote the rules on "Spellcasting" (specifically "Spell Level"):
Every spell has a level from 0 to 9. A spell's level is a general indicator of how powerful it is, with the lowly (but still impressive) magic missile at 1st level and the earth-shaking wish at 9th. Cantrips -- simple but powerful spells that characters can cast almost by rote -- are level 0. [...]
Thus we can see that Cantrips are also spells, and so Flames of Phlegethos will let you reroll the fire damage dice (and only the fire damage dice) of green-flame blade.
The flames can appear but the 1d4 additional damage occurs when somebody hits you, not when you hit somebody else
To quote the feat:
Whenever you cast a spell that deals fire damage, you can cause flames to wreathe you until the end of your next turn. The flames don’t harm you or your possessions, and they shed bright light out to 30 feet and dim light for an additional 30 feet. While the flames are present, any creature within 5 feet of you that hits you with a melee attack takes 1d4 fire damage
Notably, green-flame blade is a spell that deals fire damage, so you can choose to wreathe yourself in flames. However, the 1d4 fire damage occurs when a creature hits you with a melee attack, while green-flame blade involves you hitting them. Thus, the 1d4 damage does not occur when casting green-flame blade.
I don't believe this is what you're asking, but if somebody attacked you directly with green-flame blade while flames wreathed around you, they would be hitting you with a melee attack, and would take 1d4 fire damage.
Also note that the rerolling of 1's does not apply to the 1d4 fire damage because rerolling only applies to the fire damage of spells, and the wreathing fire effect of the feat is not a spell.