Speed wobble can be horrendous to correct and control so well done for making it out unscathed.
You sure it was the forks? Or was the flex caused as a result of something else? It’s very rare for forks to flex *that* much (even on my CX, they’re not that bad, on my road bike it’s virtually undectable). Give the whole bike a thorough checkover, make sure the tyres are on straight and inflated to correct pressure, brakes are pulling evenly on both sides of the wheel, all the bearings are smooth (especially headset), spokes/QRs/nuts & bolts are tight etc.
As colnagokid says ^^, try relaxing more on the bike, if you’re tensed up it’ll exacerbate any vibrations. And, until you get used to the new bike, keep the speed down a bit! Road bikes handle completely differently to MTBs, it’ll take a while to get used to how little input is needed to make even quite dramatic changes in direction/speed.