You could take it in stages ... first get the horse to stand at the block. Every time they move, allow it to happen, move the block back to the side of them (take block to horse, not horse to block) and repeat until they stand still. When they stand still, praise. Then move onto putting a foot up on the block - each time they move repeat moving the block and praising when stood still. When you've got that sorted move onto putting a foot in the stirrup and out again - move to the front and praise. If they move, go back to the beginning with moving the block to them. Then leaning over. Then sitting on the horse. When horse stands still with you mounted, get off and repeat the final mounting stage several times over. Getting on one side and off the other is good training. Get the horse used to the idea that standing still in itself is a reward and does not always lead to 'work' Repeat until horse stands totally still whilst you mount etc ... praise, put away for the day and then next time mount and ride away. Could take just a few minutes, could take hours but persevere and you will get there. I had the same problem - this is the solution my riding instructor gave to me and it worked within 20 mins. Just one approach of many. HTH. xx
ETA:whilst I was typing this, a similar approach has already been mentioned. Sorry about that!