I transferred from one investment to another within the same company, and TurboTax imported a T5008. Now I have a Capital Gain, why when I did not sell my investment?

I moved $20,000 from one investment to another within the same company. When I imported my information, a T5008 was generated which I did not have a paper slip for. The information TurboTax imported was incomplete (the book value was missing).  So my book value was $14,000, which creates a Capital Gain of $6,000 and is significantly increasing my income and taxes owing. If I transferred the amount from one security to another - why would I have to pay capital gains? I understand I would have capital gains if I cashed the security - but not for a transfer.