The difference between asking for donations and a sponsored event ought to be that the person being sponsored is making some sort of effort or achievement, so it seems a bit off to take the money when that isn't the case. In the olden days, you didn't collect the money until the event had taken place, so you could go back and say how many laps or whatever you did - usually there would be a space on the form for someone to sign to say you'd completed it. Nowadays, most people just put a lump sum and hand it over in advance, which saves the admin but removes the incentive.
DD's school had an annual sponsored "swim", where the children swam or walked backwards and forwards across the school pool while the PTCA counted widths. As DD really needed the incentive to swim, I offered double money for widths she actually swam - but they weren't willing to record that, so it was another pointless session of walking in water. I'd rather they'd asked for donations and used the time more productively.
As a child, we were not allowed to ask people outside the family for sponsors, as my parents didn't want people feeling obliged to donate. We didn't do the event, if optional, or had just our parents on our sponsor sheet. You should not feel obliged to raise a certain amount.
Anyway, in this case it is poor that they had someone collecting sponsors but not participating, but possibly they just forgot that your DC would not be there at the relevant time, so I'd probably just let it go - perhaps doing the walk with them at another time so they can feel they've achieved it. You could mention to the nursery that you felt rather embarrassed that when your DC's sponsors asked about the walk, they hadn't done it, but I don't think I'd ask for money back.