When trying to burn off calories and lose weight you should opt for the treadmill when doing indoor exercise.
A treadmill run is a weight bearing exercise which engages more of your muscle mass that helps you lose weight much easier and faster.
An exercise bike can still help you lose weight but you will lose more weight much faster and burn more calories in less time on the treadmill.
Even running, jogging or taking a walk on a nice day can help you lose weight much easier and faster than an exercise bike.