ClassCastException happens when you try to cast an object to something it isn't.
The only point of casting any object ever is to cast it to some subclass... whether it's a subclass of Object, or of Spatial, or of Body... as long as it actually IS the class to which you are casting (or a subclass) then it will work just fine.
That's really basic Java stuff.
Edit: also note that to avoid the constant iterator creation and casting, I probably keep my own SafeArrayList to iterate over the array of MyBody directly... which also bypasses this whole conversation. But knowing how and when to use casting is important.