The bad news is that yes, you are subject to capital gains tax for the gain (assuming US tax jurisdiction). You may also be subject to short-term capital gains if you sell the stock within one year of the repurchase.
The good news is that your cost basis is now $200 for the stock, so you will pay less tax (or maybe even count a loss) when you sell the stock in the future (if you hold it for more than 1 year).
So you effectively accelerated your tax burden if you end up keeping the stock past the end of the tax year.
If you have other investments in non-retirement accounts, you could also count any capital losses against that gain, reducing the tax burden.
For future readers: Before selling your investments just to change brokers, ask your new broker if they can transfer your investments. There are mechanisms to do this, but individual brokers will have varying procedures, and some may not be able to transfer every investment (e.g. proprietary mutual funds) but it will definitely alleviate the problem of triggering gains just to transfer custodians.