You could probably solve this with PowerShell but here is a simpler way. Go to "Step 3- Kill Java Processes" and go to the Conditions tab. Change "Logged On State" to "Only run if no user is logged on." Go to the Options tab and change the "Error Mode" to "Stop Deployment with Error"
I would advise against modifying steps 1 or 2-- you don't want to set them to stop the deployment on a failure since they will fail on machines that don't have 32/64 bit Java. It's also harmless to run those steps if a user is logged in since they only read a reg value-- they don't actually do anything disruptive to the user. You could create a new step as the first step in the package and set the above options there, though.