I think that DNS is an application layer protocol because if for
example i want to create a TCP connection i need the destination ip
address in layer 4, Am i correct?
IP is a layer 3 protocol.
DNS is just a service that translates host names into IP addresses, you need this because humans are better at remembering names than numbers.
So once you enter a website name your browser client has some API to ask the operating system to issue a DNS request for the name you entered.
DNS requests are transmitted to a specific DNS server IP address that resides somewhere on the internet (The address which you configured manually or received via a DHCP update).
For that server to know which service you specifically want (since this server might also be an HTTP server for example) you also need to specify a port number, DNS uses UDP port 53.
So for that reason it must be an application layer protocol.
If your DNS server would always reside on your local subnet you could have a Layer 4 protocol to implement this (the sever would then identify the incoming request by the unique multicast IP address dedicated for this service - the same mechanism as OSPF for example).