The thread mill is the best solution. That said, many of the G codes used for thread milling are not supported by GRBL. It is possible to rewrite the g code to handle the thread mill operations within GRBL.
The threading on that lid is very coarse (to fit the jar) and looks to be pretty forgiving. The suggested single profile threadmill may work, although they max out at a depth of cut which may not be deep enough for the threads on your jar, plus they cut a sharp V so would be many many passes to get any sort of round profile.
Of course you need the diameter to be small enough so you can make a helical thread, rather than just a concave groove in one plane. Still would need to make multiple passes but may get you closer.