both are good at their own place, but if you want to stay healthy and fit, you must do strength training or lift weights in the gym. If you can't go to gym, try to get a home gym and do swim for cardiovascular performance.
Swimming is better than biking as the former involves a full body engagement vs the later in which mostly lower body is active.