Hello Luiscuevas1996,
Thank you for using the Apple Support Communities. We see you have a question about sorting content in the Music app for iOS, and we'll be happy to provide an answer.
This resource covers sorting options: View albums, playlists, and more in Music on iPhone
- Tap Library, then tap Playlists, Albums, Songs, TV & Movies, or Music Videos.
- Tap Sort, then choose a sorting method, such as title, artist, recently added, or recently played."
While it's not possible to sort by song length on iOS, you can always send your suggestion to Apple here: Product Feedback
As an alternative, if you use iTunes or the macOS Music app, you should be able to sort by song length there. You would do this by opening the Songs view from the Library options, and then clicking the "Time" field.
We hope that helps.
Take care.