Butterflies feed mostly on nectar from flowers. Some also get nourishment from tree sap, pollen, rotting fruit, dung, & other substances that have dissolved in water, sand or dirt. Adult butterflies consume only liquids that they suck up by means of there Proboscis. They feed on flower nectar, but also sip water from damp patches. the r attracted to sodium in salt & sometimes even land on people, attracted by their sweat. Sodium is vital for butterflies reproduction along with several other minerals. To find these other minerals, Butterflies often visit dung, & rotting fruit.
So throw a peach or something like that in there & the little guy will be okay.