With the release of trainer battles, the Ace Trainer medal is now able to be earned again. By opening the “Near By” menu and swiping left, you can choose to battle and train against any of the team leaders. Once the battle is over, the progress to the Ace Trainer medal will increase.
Looking to learn the ropes or sharpen your budding battle skills? Team leaders Spark, Candela, and Blanche are eager to test your bravery! [...] Work toward earning an Ace Trainer medal!
(emphasis my own)
Unfortunately, you are no longer able to earn this medal with the new gym system, but it will stay in your achievements list for historical purposes
What’s going away
Ace Medal: This achievement is also retiring. You’ll still keep the Medal but, since you can no longer train at Gyms, you won’t be able to make further progress on it.