The wording quoted in the question is from an earlier print of the PHB. In later printings, and in the SRD (v5.1, p.188) it reads:
The transformation lasts for the duration, or until the target drops to 0 hit points or dies. If you concentrate on this spell for the full duration, the transformation lasts until it is dispelled
This wording seems to answer the question, that "lasts until it is dispelled" replaces the ending conditions given earlier, but also notes that the effect can be dispelled.
For some reason, this change was never listed in official errata, though the wording did indeed change between printings.
Also, apparently Crawford stated explicitly that this clarification was made on Twitter.
There are magic and non-magic items made from adamantine
While the DMG lists Adamantine Armor as a magic item, some items made from adamantine are not magic.
Gargoyles resist damage from “nonmagical weapons that aren’t adamantine” (MM, p 140). It follows there would be nonmagical weapons that are adamantine.
So, adamantine weapons would strike gargoyles similarly to how magic weapons would, without being magic weapons, or even magic items. Mechanically, they are similar to silvered weapons (the phrasing in monsters’ resistances blocks are the same) but they defeat a different set of monsters’ damage resistances.
Xanathar’s Guide does not call Adamantium “Magical”
Xanathar’s Guide to Everything (p. 78) has a section on adamantium weapons which describes adamatine as “an ultrahard metal found in meteorites and extraordinary mineral veins” but does not mention it being magical.
Xanathar’s lists the properties of weapons “made from or coated by” adamantine. These are distinct from the proprties of magic items. For example, adamantine weapons don’t get magic item resiliency.
Official Example (Spoiler Alert)
There is an example of such a weapon in official Wizard’s 5e material.
In The Lost Mine of Phandelver, the Spider Staff is a “black, adamantine staff” that “can be wielded as a quarterstaff.”
Note, the staff does not strike as a “magic quarterstaff” like the Staff of Power does. It is a magic item but not a magic weapon. As far as whomping things goes, it is a “nonmagical weapon made of adamantine.”
For mithral items, the rules say very little
I’m not aware of any mention of mithral in the core rules outside of the magic armor. A DM might follow the example of adamantine — that it’s a rare metal that is often found in magic items. Or they might rule it is inherently magical.
Magic Items are defined as such. Custom items are defined by your DM.
If an item is listed as a magic item then in general they would have the qualities common to magic items of their type. A custom item invented by your DM might have any properties.
The particular qualities of any particular item in your game are of course up your DM. Your character might (and probably should) learn whether an item is magical or not, and its properties, resistances, etc., by means such as an Identify spell.
Best Answer
This ruling isn't "standard" D&D5e. (Assuming the GM was using the Flying Sword as presented in the Monster Manual.)
(Of course, this effectively is a homebrewed animated sword. In which case the GM is free to give it whatever damage immunities they would like.)
The Flying Sword (MM p.20) has no immunity to fire. (It is immune to poison and psychic damage, so even in that stat block we can see it'd have been easy to add "fire" to that list, but the developers didn't.)
Additionally, adamantium in 5e traditionally grants the nullification of critical hits, rather than immunity to fire. See DMG p.150, for example.
That said, I've seen this sort of misunderstanding/mistake/mismatch in expectations cause too much grief at tables. I strongly recommend that out of session you take a moment to ask the GM about it, rather than let it fester. And that conversation doesn't have to be confrontational: "hey, that's neat that some materials grant fire immunity--can I quest for some of that and have it crafted into a shield?" can work just as well as "oh, so I guess I'm going to have to have cantrips ready to deal two different damage types, now?"