Stuck in 2nd is the Transmissions protection mode, had a similar issue with my E55 a year or so back.
Speed sensor is the most likely & as others have said it forces you to do a good trans service...