"I didn't like that book."
Translation:No me gustó ese libro.
You could say "A mí no me gustó...", but not "Yo no me gustó...". "Yo" is the subject pronoun "I", and the subject of this sentence is "ese libro". ("Me" in this sentence is the indirect object pronoun.)
"No me gustó ese libro" is literally "That book was not pleasing to me".
Sticking a "yo" in front produces something like "I, that book, did not please myself", referring, I guess to a point in the past when you were that book.
I like books, but I don't think it would please me to be a book.
The Spanish sentence "Me gustó ese libro" has "gustó" (it pleased) as the subject and verb, "me" as the indirect object pronoun that translates to "me" in English, and the noun phrase "ese libro" (that book) as the direct object noun. Literally, this translates to "To me, that book, it is pleasing." If you substitute the correct syntax/word order in English, the word-for-word interpretation is "That book didn't please me."
eso libro is the subject of the sentence, not a direct object noun
gustar has no direct object
Rewording the sentence shows you how it "works" grammatically.
That book was pleasing to me.
gustó = was pleasing / pleased
that book gave pleasure to me
If you're looking for a direct object,
it is really not mentioned in Spanish but is really "pleasure"
The book gives pleasure to me.
The correct answer is 'ese'.
'eso', the neuter form, would only be used if the noun were NOT in the sentence.
I liked that. Me gustó eso.
I liked that book. Me gustó ese libro.
Works the same for este/esto and aquel/aquello.