Basil is an outdoor annual flowering plant; it needs full sun (like, 8 hours a day), rich soil (much more so than most herbs), and space - and LOTS of it - to grow. I have three basil plants outdoors in a 14" pot, and they are flourishing.
If you want to save yours, quit trying to grow it as a houseplant - the plant will be leggy and weak, and it will be susceptible to attacks by aphids, whitefly, etc. , not to mention puny in flavor, too. Transplant it to a tall 8" pot, and put it out on your porch, if you have one. Water with rooting hormone for a couple of weeks. Let it grow for a couple of weeks, and pinch off any forming flowers. But don't expect it to overwinter in the house. Ain't gonna happen.
Sorry.