"I have one tomato."
Translation:יש לי עגבניה אחת.
They're the same word. The norms of spelling, when writing without nikkud, change over time, and also there are slight differences that are due to personal taste. Some people like to write it this way, some prefer the other. I think I mostly see עגבניה but maybe not everyone will agree.
After Even Shoshan it is either עגבנייה in Ktiv male, where consonantal ו ([v]) and י ([j]) are doubled in the middle of words, or with Nikkud: עַגְבָנִיָּה. Thus the above solution is treif. What do you from Duolingo say to this?
It's feminine, he's not referring to male as in masculine or the opposite of female. Instead he's referring to a Hebrew term for writing diacritics: https://www.hebrewpod101.com/lesson/absolute-beginner-questions-answered-by-your-hebrew-teacher-4-niqqud-vs-ktiv-male/