There is not much you can do to get it to flower other than wait-only water if it shows signs of wilting-not on a regular basis-if that is 2 weeks then so be it-this will trigger a mechanism in the plant that makes it think it is on the way out so will flower in order to reproduce that is when you will get fruit.
Patience is a virtue.
As regards light again as much as you can-I am guessing you don't have a greenhouse?
The legginess is because it is indoors where light levels are lower and it is a touch warmer-you should get something but it is hard to predict when.