Man loses bid to be declared boy’s dad