Difficulty swimming normally is one symptom of several issues/diseases. Very rarely is it actually "swim bladder" itself, so one needs to find the underlying issue. As it notes in the linked thread, digestive disorder is one. Others include water problems (ammonia, nitrite, high nitrate, possibly parameters too (GH, pH, temperature), internal injury, genetic issue, and internal protozoan which will not be seen or identified without a necropsy by a biologist/microbiologist. The latter can spread very rapidly, killing one, two, three fish every day. Keep a close watch. I have seen this erratic swimming continue in the one fish for days, and never spread, and I have seen it kill the fish within one or two days without spreading.
Try the cooked shelled peas. I woould not advise any medications as it is next to impossible to know what might be the underlying issue if it is something disease-wise. Water parameters and conditions can be tested.