The energy assoicated with a magnetic field is given by:
U =(1/2) L*I^2 (*where U=energy, I=current, L=inductance)
Since we know the current, we just need to find the inductance to solve for U:
Because we are given the magnetic flux we can use the following relation:
Magnetic flux = L*I (*note, remember to multiply magnetic flux by the total number of turns to get the total magnetic flux)
Using this equation we can solve for L, and then plug back in the first equation to find U.