How can I ensure that my software is correctly cited?
You could try adapting one of the existing open source licences, with help from your university's Legal IP team.  But a software licence is the wrong tool for the job.

One way to do it, is to write a methodology paper. That's the paper that then gets cited by anyone using your code, or an adapted version of your code, to produce material for subsequent papers.

As the paper you published was just about the results you got from the software, I've got some bad news and some good news for you.

The bad news is that you've got to write another paper.

The good news is that this new paper will use work that you've already done. It will be a methodology paper where you describe the software in detail, providing the source as supplementary information. And that's what will get cited, by those who use your software.

You can also include something such as a bibtex file in with the distribution of your software, to make citation easier: the more you can do to reduce hurdles to citation, the more chance you've got of getting those citations. Once you've got the above paper written, the bibtex file should describe that paper. And before then, you can do what the R-project does:


  To cite R in publications, use


 @Manual{,
   title        = {R: A Language and Environment for Statistical
                   Computing},
   author       = {{R Core Team}},
   organization = {R Foundation for Statistical Computing},
   address      = {Vienna, Austria},
   year         = 2013,
   url          = {http://www.R-project.org}
 }



  Citation strings (or BibTeX entries) for R and R packages can also be obtained by citation().