You should just be able to buy it, and the turrets should be docked fine.
Have you bought a ship and this has happened then? Docking mechancis were changed slightly awhile ago. It could be that your blueprint is older than that and the docking areas are no longer the right size for the turrets. Try a newer blueprint, anything available on this new site should work fine.