Should I give up on this 51/2 year pineapple plant?
If your plant doesn't want to flower by itself, you can try to stimulate it with ethylene gas. There are more ways to get this gas, but the easiest way is to use apple pieces and put them close to the rosette. Here are more methods described for ethylene gas production in order to stimulate flowering in Ananas.
Getting sunlight through glass windows is filtered light at best.. tropical plants of this nature like lots of direct sun, especially in cooler climates.. consider moving her just outside that glass door, using apple slices may help, but also feed with a blooming and rooting formula (higher phosphate on the NPK rating) something like product in photo but maybe half strength and twice as often as directed to not burn it..also DO NOT feed it until its been outside a week or 2 and adapted to the temperature change and feed in the evening not in the heat of the day to avoid burning it aswell, when nightly temps are regularly getting near the 40s bring her back inside and use plant lights to continue growth all winter