Update Kill-Java.ps1

replaced all for loops with ForEach-Object, and some other corrections.