I am getting the exact same issue, I've done everything that it says to do to fix it and still just gets stuck on "cannot connect to OSBot!" and directly under it "Please restart OSBot".
I even went into my firewall settings and played around with that, I put my username and password in and press enter, nothing happens.
The only thing that I can do is click the "Game client patcher" and patch and unpatch runelite, I even downloaded the official jagex up. Nothing I do can get it to change.