Where do I enter capital gain from closing a new IRA after year it was created but attributing closure to same tax year?

I started an IRA last year not realizing I was over the income limit.  Since I was allowed a reduced Roth contribution, I transferred a portion of the IRA to a Roth in early April and reported that in the IRA contribution section. 

Right before the 15th, I was advised by Fidelity to just close the account and transfer to regular brokerage for now.  These sales did not finalize until April 18, and transferred the 21st, but I was told told this go towards 2016.  Where do I enter the gains for the remainder of what was in the IRA sold/transferred to brokerage?  Do I enter each stock as an individual capital gain in the main capital gain section, or is there a special place for place for IRA closure/transfer/reclassification? 

Also does this sale count towards 2016 or 2017?  If I transfer these to Roth this year, is there special handling of IRA to Roth in 2017 taxes, or is it just treated as a straight capital gain and what I do with it in 2017 is irrelevant?