Do you guys know why didn't it worked and what can I do to improve?
The filter can only average your signal into a DC value. If you directly connected a DC voltage multimeter to your pulsing signal, you'd get exactly the same DC value.
$$\boxed{\text{In other words, the filter isn't bringing any magic to the party}}$$
If you want to do it more effectively you could use a monostable circuit. The monostable would be triggered by the positive rising edge of your digital servo control signal. It would produce a pulse of duration of around 1.5 ms (i.e. it would time-out half way between the two logic level times).
And, when that pulse times out you would use that event to sample the digital servo control signal. You would likely use a D type flip-flop for this and the output would resolve to a 0 or a 1 representing the logic-level behind the digital servo control signal output.
That's how I'd do it anyway.
You could use a comparator after your filtered signal make the logic output but then there are other things to consider such as how much hysteresis is needed, how much RC filtering is needed and how much delay time can be tolerated due to the filter. The monostable/flip-flop will resolve the digital value in one cycle (20 ms) maximum.