To make these cupcakes gluten-free, substitute the all-purpose flour with a gluten-free 1:1 baking flour blend that includes xanthan gum. Ensure that all other ingredients, particularly the peppermint extract and candy canes, are certified gluten-free to avoid cross-contamination.