Oh yes, definitely yes.
To put it very simply, there are two kinds of debts: 1. priority debts (government type debts such as taxes, student loans, and child support) and 2. everything else. Priority debts usually survive bankruptcy. Everything else can be discharged.
A gym contract falls into the “everything else” category. Not only can you list the past due amount in your bankruptcy, but you can also list and cancel the ongoing contract with the gym. Here in Utah, Gold’s Gym is a very active creditor. When you fall behind on your monthly membership dues, you start receiving phone calls from Paramount Acceptance. Soon, you will be sued by a collector with a name like a caveman, “URG” (this is United Recovery Group). Then they start garnishing. Gold’s Gym is a great gym, and as a collector, they are a very effective creditor as well. If you don’t want to be clubbed over the head by URG, you are probably strongly considering bankruptcy.
Now let’s say that you want to keep your gym membership, then you can. You can chose to keep this long term contract, but remember that if you have any past dues, they will require you to pay those up to current before you can go back to the gym.