Reworking a Homework Project to Publish as Research
Chances are your plan is fine. You created the piece of work, and you weren't funded, so there's nobody else that can claim that as his or her intellectual property. Still, I would suggest working with an academic over this - probably the person who set the homework problem. If there's a potential issue with your plan, he is likely to know; further, he can offer you critical comments to get your work up to scratch (writing a literature review is quite different from a homework assignment), and if he's willing to add his name to the paper that adds a lot of credibility to it. He might even be able to suggest a journal for you.

As for affiliation, yes, you list the university you were at since that's where you did most of the work.