Djinn or jinn are supernatural beings in Arabic mythology and aren't innately good or evil. They are just like humans and it was believed they would be judged for their actions in front of Allah just like regular humans. There is no mention of them being able to grant wishes in the original mythology where they were shapeshifters and were blamed as the cause for mental disease and madness.
The wish granting genies are somewhat loosely related with the djinn of Arabic mythology. The wish granting genie most likely has their origin in the One Thousand and One nights compilation of folk tales but since that is a Persian work of literature the genie is actually the div (or daeva) of Persian mythology and not the djinn of Arabic origin. The two just got conflated in popular culture.
Even though modern genies are an amalgamation of different mythological creatures they have kept some of the original properties of the creatures they came from. Genies can be good or evil or just neutral and they have different names according to their moral compass. Ifrits and marids are usually depicted as evil genies while their more benevolent compatriots are simply called Djinn. A very common trope is for the evil genies to interpret wishes literally or corrupt them somehow which brings misery and ruin to the wish maker while neutral or good genies will interpret the wishes in a more "common sense" way or even work to bring the wish maker happiness.