Thanks for your question and asking for me.
If you transfer the shares to your sons, this will create a capital gain 9although entrepreneurs relief may well be available ( thereby allowing just a 10% charge) but you then also incur a capital gain (through the tax remit of corporation tax) once the developed flats are sold so yes, you create a double tax position.
If, however you sell the property to your sons, then you will just have the one charge within corporation tax, but then your sons will also have a charge when the properties are sold, so it does not change the tax position, but just on whom the liability arises, and when that liability arises.
Its unlikely that you will benefit from entrepreneurs relief or any other business asset relief as it does not seem as if the property was used to trade in, within the business itself.
But I would get your accountant to provide you with a calculation for each (as he will have more in depth information such as profits for the company, and the future of the limited company, if its only assets and possibly trade is property, and at what rate corporation tax is due the you at least have hard figures
1) with it all falling on you/the limited company OR spreading the load
2) between the company and your sons
Do feel free to ask any follow up questions