I'm not aware of any public transport options other than what you've suggested. Hitching is possible, but you need the right circumstance for people to take time to stop and give you a lift. On the other hand, it happens. I gave a lift to some tourists in Tasmania over the summer break.
It's a good 3 hour walk up the Pentland ranges from Bachuus Marsh. The taxi would be the best bet for convenience, though Uber would probably be cheaper. The app should be downloadable to your phone.
Given this park is accessible from the western highway, a major arterial route between Adelaide, and Melbourne, there is a bit of traffic, so hitching a lift is possible. Your best bet might be to find a service station, or truck stop and hope to find someone who takes pity on you. There's a BP near Rockbank station that might be worth a try. There's also a bus stop on your way where someone might stop to give you a lift. It's probably worth trying that, as you may be lucky, and you're less likely to be moved along from there. Also be aware that hitching in Victoria isn't legal, so be prepared if you get questioned by police.
Worst case, go the extra distance by train to Bachuus Marsh and call an Uber. I'd recommend that ahead of taxi prices. Just be aware that line is not electrified, so the trains aren't as frequent as they are within the city.