2004 BMW 318i

2004 BMW 318i – how to replace the range selector switch?
This car is giving problems with the automatic transmission (steptronic) – jerky gear changes with the transmission dashboard warning light coming on.
I want to replace the range selector switch for the transmission but needs some guidance on how to do this.
Appreciate any assistance with this. Thanks.