A Los Angeles Superior Court judge ruled that the legendary musician is suffering from “a major neurocognitive disorder”