while they are the same... ish.
but I personally would probably understood "I love to swim" as some casual activity, while "I love swimming" as loving the sport called swimming (either as a swimmer or as a spectator at swimming event).
So they can be the same, but can mean different things.