m0useanswered grow question 8 months ago It will only switch into flower when getting around 12hrs of uninterrupted darkness.
So the neighbours light could be playing a role in it, but I would think it would only be on some parts of the plant as it will still be dark on the half of the plant that's not getting blasted by their motion sensor flood lights at night.
I have issue with ambient city night light, its not dark enough and so much street light floods into my deck. Best I can do is pin all my plants down and prevent them from growing taller then the light blocking side.
The pistils showing is also it telling you its sexually mature and does not mean it is going into flower right away.
Depending on where you are in the world check your night time length of sunset and sunrise, this will help you figure out if its getting enough darkness to Initiate bloom. A good rules of thumb for the darkness is this, : hold a standard type book about 12" from your face, if you can read the print on a random page then it is to much light. If you can't or have a really hard time reading it, it is ok.
Good Luck!