To prepare these cupcakes gluten-free, substitute the all-purpose flour with a high-quality 1:1 gluten-free baking flour that includes xanthan gum. Ensure all other ingredients (especially peanut butter, baking powder, and jam) are labeled gluten-free and produced in a gluten-free facility to avoid cross-contamination.