Walking vs cycling?

Hello! I’m scheduled to be sleeved on Jan 2. I’ve been reading a lot of posts that say that walking is really important. I have a bad knee—from an injury several years ago— that makes walking painful. BUT I have a stationary bike. It’s much easier on my knee. Is this an acceptable substitute?

I’m hoping that losing some weight will make my joints hurt less in general, but I know that will take time.