If it works on GPIO 4 with dtoverlay=w1-gpio,gpiopin=4 then it should work just as well on any other.
It certainly used to work as I've done this in the past.
Choose the GPIO you want to use, wire it up, change /boot/config.txt and reboot. If it still doesn't work post a photo of your set-up.
I just wired a pair up to GPIO 21 (pin 40)
$ cat /boot/config.txt
sdtv_mode=2
dtparam=i2c_arm=on
dtparam=i2c_vc=on
dtparam=spi=on
dtoverlay=w1-gpio,gpiopin=21
#!/usr/bin/env python
# Public Domain
import glob import time
# Typical reading
# 73 01 4b 46 7f ff 0d 10 41 : crc=41 YES
# 73 01 4b 46 7f ff 0d 10 41 t=23187
while True:
for sensor in glob.glob("/sys/bus/w1/devices/28-00*/w1_slave"):
id = sensor.split("/")[5]
try:
f = open(sensor, "r")
data = f.read()
f.close()
if "YES" in data:
(discard, sep, reading) = data.partition(' t=')
t = float(reading) / 1000.0
print("{} {:.1f}".format(id, t))
else:
print("999.9")
except:
pass
time.sleep(3.0)
$ ls /sys/bus/w1/devices/
28-000005d34cd2 28-001414abbeff w1_bus_master1
$ /code/DS18B20.py
28-001414abbeff 18.6
28-000005d34cd2 18.5
28-001414abbeff 18.6
28-000005d34cd2 18.5
28-001414abbeff 18.6
28-000005d34cd2 18.4
28-001414abbeff 18.6
28-000005d34cd2 18.5
Is the w1-gpio overlay not compatible with Pi2? It works OK on my old Model B!
– MillmoorRon Feb 26 '16 at 10:50