I'm afraid to tell you that Hanon only works for weighted piano keys. You could seriously damage your hands if you try to play Hanon on a nonweighted keyboard, so be careful with that. Because of less resistance (no weights behind the keys) the speed and sudden shock every time your fingers will "go to a stop" can be destructive to your hands on a keyboard.
The only way to practice Hanon is on a piano or digital piano /synth with weighted keys.
However, you might want to skip doing Hanon altogether as it's overrated. Hanon trains muscles in a very unmusical way. It is much better to train your fingermuscles with musical lines that are given a musical context.
Alternatively, instead of training your fingers to get strength and use strength, train them to use less strength, to be more efficient: - by playing soft, pp + mp. Try to variate in between and "hold back" your strength. Try to be as precise and in control as possible regarding the dynamics and timing. Don't forget to breathe and stay relaxed, avoid any tension building up that wants you to "play loud". Keep playing soft, hold back and watch your timing. This, you can even train on a nonweighted keyboard.
After a month or two, try tackling one of the demanding pieces to see if your technique got better in knowing how to use your energylevels by training to play soft dynamics, see if you have become more efficient. Stresslevels in your hands can often make it much more difficult to play a demanding piece and fingerstrength often isn't the solution. Often the strength isn't whats needed but the speed of your fingers hitting the keys are
This principle works better with weighted keys and that's what you should aim for getting if you want to improve in long run.
If, after this, you feel you hit a wall of not being to progress, try the same method again, but on a piano/digital piano and be patient.
Some of the cheaper digital piano models of Roland and Yamaha will do just fine, but you're recommend to try them out in the music store before buying.