You'll need to have the sword (or other cutting weapon). Fortunately the boss you had just defeated has the sword ability.
The energy sphere should be sitting in a small enclosed area where there is a solid platform held by a rope blocking your path (and the Waddle Dee). On the outside, there should be a smaller platform. To get to the energy sphere, you need to cut the rope to drop the platform to give you access to it.
To get to it, just stand on the outside platform facing the rope and slice with your sword. The range of the sword swing should be able to hit the rope. Other cutting abilities (e.g., cutter, ninja, etc.) may or may not work as they don't have the range or would be able to go through the wall. But getting the sword would be easier since you had just defeated a boss that had it.
Here's a hint, about 95% of the time you fight a mini-boss in a level, you'll need its power to get an energy sphere that comes up right after. So you should always take the power of the boss if you want to collect all the spheres, even if you don't want its ability and you already have your favorite weapon. You'll almost always need it. Besides, getting back your favorite abilities should be easy anyway in other levels or the ability rooms you unlock.