Swimming, across the strokes is invariably a whole of body exercise with greater or lesser emphasis on different muscle groups according to the stroke type.
A balanced generalised dryland workout across all strokes engages and develops:

Butterfly is a demanding and biomechanically complex stroke to acquire and perfect. In your dryland work you need to ensure you are targeting the related muscle groups. This diagram from Dr John Mullen (c) swimmingworldmagazine illustrates these muscles:

The mechanics of the stroke
It is crucial that you understand you need to have a biomechanical context for targeting these groups and not only increase the strength, fibre recruitment and activation for these but also apply to butterfly specific in-water skills and practices. Context means stroke analysis.
The primary movers of the butterfly stroke are the pectoralis major in your chest and the latissimus dorsi in your back, which power upper arm adduction, drawing your arms in toward your body -- during the push phase. The muscles at the top of your upper arms, the biceps brachii and brachialis -- activate as your elbows move from full extension at the beginning of the catch to about 40 degrees of flexion midway through the pull. During the final stage of the pull phase, you use your triceps to explosively extend your arms. While your shoulders -- deltoids and rotator cuffs – position and move your arms during the recovery phase, your wrist flexors serve to keep your wrists in a slightly flexed position throughout the stroke.
Your hands enter the water at shoulder-width apart or slightly narrower and then trace a pattern through the water that resembles an hourglass. Once underwater, your hands sweep inward, moving under your body. To push against the water’s resistance, you use the muscles in your hands, or thenars, as well as your forearm flexors, the brachioradialis and extensors; the extensor digitorum muscles. The degree to which you bend your elbows depends on how deep your hands are underwater. In turn, the depth of your hands is determined by the strength of your upper back and shoulders. During the final stage of propulsion, your hands move around and past your hips and then toward the water’s surface for the recovery phase.
In contrast to the freestyle, the butterfly uses the undulating torso movement. The paraspinal muscles contract to begin this undulation. First, the muscles in your back arch while your arms move into the recovery phase of the stroke. Then, the abdominal muscles or your rectus abdominis and obliques, immediately contract. This contraction enables your upper body to follow your hands into the water and start the propulsive phase of your stroke.
The motion of the butterfly’s dolphin kick, a double kick, also follows an undulating pattern of movement. Although you use the same leg muscles as you would in the freestyle stroke, your legs move together. The downbeat of the kick, which provides propulsive force, starts with a contraction of your hip flexors, or the rectus femoris and iliopsoas. You then extend your knees, which activates your quads. During the recovery phase of the kick, your glutes and hamstrings contract to extend your hips. Throughout the stroke, the plantarflexed position of your feet , ankles extended and toes pointed, involves the activation of your calf muscles, or gastrocnemius and soleus.
Fitness Science FLY workouts
These are highly targeted and multi-mode making use of equipment such as ski ergs, TRX suspension systems, medicine ball plyometrics and conventional resistance training. Workouts reflect swimmer experience in and out of the pool and extend our core race-ready Swim Platform Series of workouts that hit on the main muscle groups all strokes have in common.
What I can share here is a subset of exercises we include:
Brachioradialis - Curl with barbell (with and without plates)
Extensor Digitorum Longus (isotonic and isometric mobility and strength);to be done in warm up
Big Toe resistance band flexion (isolated toe)
Same again but engaging ankle and big toe
Obliques
Side Bridges from side plank opposition using bench
Elbow to Knee Crunches
Broomstick Twists
Swissball Plate Twists ( with proper technique)
Anti Rotation Press Outs
Corkscrew Twist from Pull Up Bar
For your posterior chain including the oft-neglected erector spinae we often use prone snow angels, unweighted and weighted.