What's next, Achilles?
J, 26 bytes
_(]+1-1&lt;/@(=],+./)q:)^:_&gt;:

Try it online!
I started with the &quot;do-until&quot; idiom f^:g^:_ with g boolean (apply f while g is true), but soon realized that the &quot;find next integer&quot; can be written in a single fixpoint (]+1-g)^:_. The only problem is that we don't have a straightforward/more golfy way to express the boolean negation of g other than 1-g.
How it works
_(]+1-1&lt;/@(=],+./)q:)^:_&gt;:  NB. Input: n
                        &gt;:  NB. n+1
_(                  )^:_    NB. Fixpoint with left arg of _ (infinity)...
                  q:    NB. (_ q: n) gives prime exponents including zeros
                        NB. _ q: 700 -&gt; 2 0 2 1 (2^2 * 5^2 * 7^1)
          ( ],+./)      NB. Append GCD of ^ to itself
      1    =            NB. Test if each number equals 1 (gives boolean vector)
       &lt;/@   NB. Test if the only 1 is the last item
  ]+1-       NB. Negate the condition and add to the input number